包裹 Android Service 类的最重要方法。 更多...
头: | #include <QAndroidService> |
CMake: |
find_package(Qt6 COMPONENTS Core REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
Since: | Qt 6.2 |
继承: | QCoreApplication |
该类在开发且可能改变。
QAndroidService (int & argc , char ** argv , const std::function<QAndroidBinder *(const QAndroidIntent &)> & binder ) | |
QAndroidService (int & argc , char ** argv ) | |
virtual QAndroidBinder * | onBind (const QAndroidIntent & intent ) |
QAndroidService 是方便类,包裹最重要 Android Service 方法。
创建新的 Android Service,传递 argc and argv 作为参数。
binder 用于创建 binder 当需要时。
另请参阅 QCoreApplication .
创建新的 Android Service,传递 argc and argv 作为参数。
另请参阅 QCoreApplication .
[虚拟]
QAndroidBinder
*QAndroidService::
onBind
(const
QAndroidIntent
&
intent
)
The user must override this method and to return a binder.
intent parameter contains all the caller information.
The returned binder is used by the caller to perform IPC calls.
警告: This method is called from Binder's thread which is different from the thread that this object was created.
另请参阅 QAndroidBinder::onTransact and QAndroidBinder::transact .