简体   繁体   English

如何从back4app.com连接到Qt Android应用程序解析服务器后端

[英]How to connect to parse server backend from back4app.com for Qt android app

I am trying to develop an Android application with Qt 5.13 . 我正在尝试使用Qt 5.13开发一个Android应用程序。 I am planning to use a parse-server for my backend. 我打算在后端使用解析服务器。 I am using a free plan from back4app . 我正在使用back4app的免费计划。 I followed the official tutorial here 我在这里关注了官方教程

But I am not sure how to import the android SDK into my Qt C++ code. 但是我不确定如何将android SDK导入我的Qt C ++代码。 ?

I added the below code to the gradle.build file. 我将以下代码添加到gradle.build文件中。

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
    implementation "com.github.parse-community.Parse-SDK-Android:parse:1.20.0"
}

repositories{
  mavenCentral()
  jcenter()
  maven { url 'https://jitpack.io' }
}

After this step, I am not sure where to put below code 完成此步骤后,我不确定将以下代码放在哪里

import com.parse.Parse;

I need to be able to run the below code in my C++ code. 我需要能够在我的C ++代码中运行以下代码。

Parse.initialize(new Parse.Configuration.Builder(this)
      .applicationId("appId")
      .clientKey("clientId")
      .server("https://parseapi.back4app.com")
      .build()

I tried to import in Qml code without luck. 我试图导入Qml代码而没有运气。

Based on the documentation you need to put the code into a .java file. 根据文档,您需要将代码放入.java文件。 For that I'd suggest to check the guide on QAndroidJniObject Class , as you'll need to do your base implementation in java and using java native interface JNI to call the code from C++ . 对于我建议去检查指导QAndroidJniObject类 ,因为你需要做你的基地实施java和使用Java Native Interface JNI调用从代码C++

Since you'll be needing https to access the server. 因为您将需要https访问服务器。 You will also need to include openSSL libs to your project, you can find the required libs and instructions here 您还需要在项目中包含openSSL库,您可以在此处找到所需的库和说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Qt Android应用中使用Parse.com - Use Parse.com in a Qt Android App 如何连接android app进行解析? - How to connect android app to parse? 应用程序拒绝连接到解析后端 - App refuses to connect to Parse backend 如何从客户端(android-java app)发送数据到解析服务器,处理它,将其保存在parse-dashboard中并将结果发送给客户端? - How to send data from client (android-java app) to parse server, process it, save it in parse-dashboard and send back result to client? 如何从Android应用程序发送http请求到计算机中的后端服务器 - How to send http request from android app to backend server in the computer 如何安全地确定尝试连接到后端服务器的android应用是我的正版应用? - How to securly veify that an android app that is trying to connect to my backend server is my genuine app? 如何将Parse连接到Android Studio应用? - How to connect Parse to Android Studio app? 从 QT 应用程序(com.android.settings)打开 android 设置 - open android settings from QT app(com.android.settings) 无法通过离子安卓应用程序通过https连接到后端 - Not able to connect to backend over https from ionic android app 如何将我的Android应用程序连接到我的PHP / MySQL后端? - How to connect my Android app to my PHP/MySQL backend?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM