QAndroidService Class
Enveloppe les méthodes les plus importantes de la classe Service d'Android. Plus...
| En-tête : | #include <QtCore/private/qandroidextras_p.h> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS CorePrivate)target_link_libraries(mytarget PRIVATE Qt6::CorePrivate) |
| qmake : | QT += core-private |
| Depuis : | Qt 6.2 |
| Hérite : | QCoreApplication |
| Statut : | Préliminaire |
Cette classe est en cours de développement et peut être modifiée.
Fonctions publiques
| QAndroidService(int &argc, char **argv) | |
| QAndroidService(int &argc, char **argv, const std::function<QAndroidBinder *(const QAndroidIntent &)> &binder) | |
| virtual QAndroidBinder * | onBind(const QAndroidIntent &intent) |
Description détaillée
QAndroidService est une classe de commodité qui englobe les méthodes les plus importantes du service Android.
Documentation des fonctions membres
QAndroidService::QAndroidService(int &argc, char **argv)
Crée un nouveau service Android, en passant argc et argv comme paramètres.
Voir également QCoreApplication.
QAndroidService::QAndroidService(int &argc, char **argv, const std::function<QAndroidBinder *(const QAndroidIntent &)> &binder)
Crée un nouveau service Android, en passant argc et argv comme paramètres.
binder est utilisé pour créer un binder si nécessaire.
Voir aussi QCoreApplication.
[virtual] QAndroidBinder *QAndroidService::onBind(const QAndroidIntent &intent)
L'utilisateur doit surcharger cette méthode et renvoyer un classeur.
Le paramètre intent contient toutes les informations relatives à l'appelant.
Le liant renvoyé est utilisé par l'appelant pour effectuer des appels IPC.
Attention : Cette méthode est appelée à partir du fil d'exécution du liant, qui est différent du fil d'exécution dans lequel cet objet a été créé.
Voir également QAndroidBinder::onTransact et QAndroidBinder::transact.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.