QAndroidService 類

頭: #include <QAndroidService>
qmake: QT += androidextras
Since: Qt 5.10
繼承: QCoreApplication

公共函數

QAndroidService (int & argc , char ** argv )
QAndroidService (int & argc , char ** argv , const std::function<QAndroidBinder *(const QAndroidIntent &)> & binder )
virtual ~QAndroidService ()
virtual QAndroidBinder * onBind (const QAndroidIntent & intent )

額外繼承成員

詳細描述

The QAndroidService is a convenience class that wraps the most important Android 服務 方法。

成員函數文檔編製

QAndroidService:: QAndroidService ( int & argc , char ** argv )

創建新 Android Service 傳遞 argc and argv 作為參數。

另請參閱 QCoreApplication .

QAndroidService:: QAndroidService ( int & argc , char ** argv , const std::function < QAndroidBinder *(const QAndroidIntent &)> & binder )

創建新 Android Service 傳遞 argc and argv 作為參數。

binder 用於創建 binder 當需要時。

另請參閱 QCoreApplication .

[虛擬] QAndroidService:: ~QAndroidService ()

Destroys the instance of QAndroidService. The destructor is virtual.

[虛擬] QAndroidBinder *QAndroidService:: onBind (const QAndroidIntent & intent )

用戶必須覆寫此方法並返迴 Binder。

The intent 參數包含所有調用者信息。

返迴的 Binder 用於調用者以履行 IPC (進程間通信) 調用。

警告: 從 Binder 綫程 (不同於創建此對象的綫程) 調用此方法。

另請參閱 QAndroidBinder::onTransact and QAndroidBinder::transact .