Questions tagged [qtandroidextras]

The QtAndroidExtras module provides classes to make the programming easier for additional functionality on Android.

This add-on was introduced in the Qt 5.2 to aid the development for the Android platform.

The official documentation of the module can be found here.

77 questions
1
vote
1 answer

How to get an int value using QtAndroid::androidActivity().callObjectMethod?

I know that using the following method, I could get a string from the Android main activity to Qt/C++ side. QAndroidJniObject my_string = QtAndroid::androidActivity().callObjectMethod("someMethod"); QString my_qsrting =…
AdeleGoldberg
  • 1,289
  • 3
  • 12
  • 28
1
vote
1 answer

Qt with android 5.9.0 installation erorr

I am trying to install Qt with android , but i am facing issues while adding AVD, sdk location : D:\android-sdk ndk location : D:\android\android-ndk-r15c-windows-x86_64\android-ndk-r15c creator showing it found 10 tool chains for this ndk ant…
narthan_l
  • 21
  • 7
1
vote
1 answer

Qt Android Deployment Failing

I have tried to modify the Android template files according to the documentation listed here In my .pro file I have the following: ANDROID_PACKAGE_SOURCE_DIR = Android_Files And my directory structure looks like this: QtProject |-- Android_Files | …
MrJman006
  • 752
  • 10
  • 26
1
vote
0 answers

Qt android : Is there a way to see QDebug output from android service?

I need to see the qDebug or qWarning output from C++ that is generated when an android service runs in Qt, in order to debug faster and easier. But, since the android service in Qt runs on a separate process, I cannot see qDebug that is generated…
Mena
  • 3,019
  • 1
  • 25
  • 54
1
vote
1 answer

qt androidextras getMemoryInfo MemoryInfo availMem object field crash from c++

How to call getMemoryInfo from c++ qt 5.6 android? Im not sure about casting from java/lang/Object to android/app/ActivityManager when calling getSystemService api, but I get valid QAndroidJniObject btw. Here is my code so…
user3453753
  • 357
  • 4
  • 15
1
vote
1 answer

Fix QML Camera's frame rate and change it resolution

Can it possible to fix frame rate and change resolution of Camera? Tried to use viewfinder.maximumFrameRate: 10 viewfinder.minimumFrameRate: 10 and viewfinder.resolution: Qt.size(640, 480) no effect, they are simply being ignored. How can…
0x0000DEAD
  • 11
  • 5
1
vote
2 answers

Calling AndroidJni static method with string parameter

I am trying to call a Java static function in Qt C++ class using QAndroidJniObject with a string parameter. This is my Java class having function which i am calling public class StatusBar{ public static void…
Eljay
  • 941
  • 5
  • 15
  • 30
1
vote
1 answer

Sending jbyte array to Java method failed using JNI

Consider this java method: public int write(byte[] src, int timeoutMillis) throws IOException { System.out.println("Write function started."); System.out.println("buffer = " + src.length); System.out.println("buffer = " + src[0]); …
a.toraby
  • 3,232
  • 5
  • 41
  • 73
1
vote
1 answer

Qt does not compile callStaticObjectMethod()

I wrote the following code from this question and it was compiled and worked perfectly: QAndroidJniObject str = QAndroidJniObject::callStaticObjectMethod( "org/.../TestClass" …
a.toraby
  • 3,232
  • 5
  • 41
  • 73
1
vote
1 answer

Calling simple java static method via JNI does not work, though c++ compiles and run it

Considering this Java class with the static method: public class TestClass{ public string str; public TestClass() { str = "Test From Java"; } public static String staticMethod() { return "Test From Java"; } } I…
a.toraby
  • 3,232
  • 5
  • 41
  • 73
1
vote
1 answer

How to get application arguments on Qt for android

I have a Qt application which has file associations defined in the AndroidManifest.xml so when I select a file in my browser I get a list of associated applications. My application is in the list, but when I select it the file path is not passed in…
Uga Buga
  • 1,724
  • 3
  • 19
  • 38
1
vote
1 answer

Starting Qt application on Boot up- Android

I know how to start an android application on BOOT of device. I have done that in Java using a BroadcastReceiver. However, my isue is something else. I'm kinda stuck at this problem: Problem: I'm using Qt for Android. I have a Qt file which listens…
0
votes
1 answer

QtAndroid: Grant Usb Permission in Android with Qt6

in android programming you need to get usb permission before working with connected device to client device. i am trying to connect a hack-rf to android device and use it... but first of all i need to get usb permission and detect that…
Nemo
  • 114
  • 8
0
votes
0 answers

Build MySQL/MariaDB drivers for Android on Windows

I have been developing with Qt Creator for Windows and mainly working with Databases and therefore QtSql is inevitable. But I decided to dive into android and I need to connect to remote server and I have a need to create drivers for android and it…
Kyef
  • 69
  • 7
0
votes
0 answers

How to add androidextras into project with CMake?

I am newbie Qt, I am start developing the android app using QtCreator 6.4. With qmake, it is easily to add androidextras into project, But I don't know how to add this into project with cmake ? https://doc.qt.io/qt-5/qtandroid.html Could you help me…
Zappy.Mans
  • 551
  • 1
  • 7
  • 19