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
8
votes
3 answers

How to keep the screen on in Qt for android?

I found a couple of solutions how to do that in Java, but did not find how can I do it in QML or Qt. I know that first I should set the WAKE_LOCK permission in AndroidManifest.xml. What should I do to make it possible to turn on and off the screen…
Uga Buga
  • 1,724
  • 3
  • 19
  • 38
7
votes
1 answer

Qt android, new qml window does not work properly

I have this main window: ApplicationWindow { id : mainWindow width: 640 height: 480 visible: true Button{ text: "go back to form 1" onClicked: { form2.visible = true; } } SecondForm{ …
a.toraby
  • 3,232
  • 5
  • 41
  • 73
7
votes
2 answers

Convert jstring to QString

I'm calling a Java function that returns a string: QAndroidJniObject obj = QAndroidJniObject::callStaticObjectMethod("HelloJava", "getString"); jstring jstr = obj.object(); QString str = jstr; // This doesn't work, obviously,…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
6
votes
3 answers

open android settings from QT app(com.android.settings)

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",…
Dany19
  • 551
  • 9
  • 26
5
votes
1 answer

Unknown module in .pro file - cannot build app with androidextras module included

I am working on some Qt/QML app which will be deployed to Android OS. Now, I need module androidextras but if I put androidextras inside my .pro file as follows QT += qml quick widgets sql core bluetooth printsupport androidextras and I rerun…
KernelPanic
  • 2,328
  • 7
  • 47
  • 90
5
votes
2 answers

General Share button on Android in Qt Quick

In my Qt Quick-based app whose first target platform is Android I need to enable the user to share an image. By that I mean the general share action on Android, which isn't limited to any particular social network: I did find some threads about…
Andrej Repiský
  • 477
  • 1
  • 6
  • 19
5
votes
2 answers

error: undefined reference to '_jstring* QAndroidJniObject::callStaticMethod<_jstring*>(char const*, char const*)'

I'm trying to use QAndroidJniObject. As a test I'm just calling 2 Java functions, one returns an int, the other a string. When returning an int, this code compiles fine: jint a = QAndroidJniObject::callStaticMethod("HelloJava", "getInt"); But…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
4
votes
1 answer

How to implement push notification in Qt android application

I develop a android application using Qt, now i wanna send push notifications. i couldn't find any push notification service that has a Qt SDK. i should mention that because of sanctions i couldn't use Firebase. is it possible to use other SDK using…
4
votes
0 answers

Push using Parse on Qt5.5 for Android: NullPointerException on getCurrentInstallation

i am trying to use the parse.com push service with Qt5.5 on Android. When trying to call ParseInstallation.getCurrentInstallation() i get the following error: W/System.err( 9094): java.lang.NullPointerException: Attempt to invoke virtual method…
Hellagot
  • 235
  • 2
  • 13
4
votes
1 answer

What is the difference between QAndroidJniObject::callMethod() and QAndroidJniObject::callObjectMethod()?

I noticed that the Qt documentation offers two methods for calling android native methods but I can't figure out when to use QAndroidJniObject::callMethod and when to use QAndroidJniObject::callObjectMethod. What is the rule?
Uga Buga
  • 1,724
  • 3
  • 19
  • 38
3
votes
0 answers

Error building APK of Qt application for Android debugging purposes

I am facing an error very difficult to overcome while deploying my Qt-based application in a physical android device for debugging purposes. My development environment consists of: Qt Creator 8.0.1 Kit: Android Qt 5.12.5 Clang armeabi-v7a JDK:…
Francisco Cunha
  • 355
  • 1
  • 4
  • 14
3
votes
0 answers

Is it possible to add Instabug / Crashlytics to Qt Android application?

I would like to understand if we can integrate Instabug or Crashlytics to an Android application developed using Qt 5.9.1. Also, will these tools be able to catch and report exceptions thrown in the C++ layer ?
3
votes
2 answers

Error deploying Qt on Android application

I am trying to run my first Qt Android application and I followed this tutorial: http://urfoex.blogspot.ro/2013/12/qt5-android-setting-up-qt-52-for-android.html However, after I ran it i got this error: i686-linux-android-g++: error: unrecognized…
Jacob Krieg
  • 2,834
  • 15
  • 68
  • 140
2
votes
1 answer

How to open a file in android with qt having the content URI

How do i open a file with QFile with link in android -content://com.android.providers.downloads.documents/document/raw.pdf I tried below code but its showing that the file not open QString…
Husni Abdul Nazer
  • 103
  • 1
  • 1
  • 12
2
votes
0 answers

Qt Android Service : How to keep service running when screen is turned off + USB cable not connected?

Why doesn't the service work all the time in the background when the screen is off + USB not connected? Using Qt, I created a test android service that uses QTimer to issues Push-notifications every 5-seconds. I did this to monitor whether the…
Mena
  • 3,019
  • 1
  • 25
  • 54
1
2 3 4 5 6