I have an android application in QT.
I would like to call android settings from a button.
I used this code in Java :
public void usb(View v){
Intent intent = new Intent();
intent.setClassName("com.android.settings", "com.android.settings.DevelopmentSettings");
startActivity(intent);
}
Is there a way to call android settings using QT C++?
解决方案
QAndroidJniObject makes it possible to create JNI objects from Qt C++ code.
For example: to get the activity:
QAndroidJniObject activity = QAndroidJniObject::callStaticObjectMethod("org/qtproject/qt5/android/QtNative", "activity", "()Landroid/app/Activity;");
For example: t