Wraps the most important methods of Android Service class. More...
Header: | #include <QAndroidService> |
CMake: | find_package(Qt6 COMPONENTS Core REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
Since: | Qt 6.2 |
Inherits: | QCoreApplication |
This class is under development and is subject to change.
QAndroidService(int &argc, char **argv, const std::function<QAndroidBinder *(const QAndroidIntent &)> &binder) | |
QAndroidService(int &argc, char **argv) | |
virtual QAndroidBinder * | onBind(const QAndroidIntent &intent) |
The QAndroidService is a convenience class that wraps the most important Android Service methods.
Creates a new Android service, passing argc and argv as parameters.
binder is used to create a binder when needed.
See also QCoreApplication.
Creates a new Android service, passing argc and argv as parameters.
See also QCoreApplication.
[virtual]
QAndroidBinder *QAndroidService::onBind(const QAndroidIntent &intent)
The user must override this method and to return a binder.
The intent parameter contains all the caller information.
The returned binder is used by the caller to perform IPC calls.
Warning: This method is called from Binder's thread which is different from the thread that this object was created.
See also QAndroidBinder::onTransact and QAndroidBinder::transact.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qandroidservice.html