Call C++ function from android BroadcastReceiver
I have an android application written in Qt. It has a BroadcastReceiver which receives incoming calls and shows a custom activity written in java.
Is it possible to call C++/Qt function and run native code, in that activity? How? (I want to access ciphered database from Qt)
Qt program may not be running while receiving BroadcastReceiver.
You can call C++/Qt to native code with JNI, here is link to start
and this is good example to start with Qt Android : http://doc.qt.io/qt-5/qtandroidextras-notification-example.html
I know how to call C++/Qt function from android.
But In this case Qt application is not running, while broadcast receiver receives signal from Android.
have you found a solution for this one? I am trying to do something similar.
Have a nice day,
This class extends
public class NotificationClient extends org.qtproject.qt5.android.bindings.QtActivity
In other words this is your activity , add BroadcastReceiver there.
Check that there is a change in AndroidManifest.xml
Where this class becomes its main activity.
I have helped .