QAndroidService Class
Regroupe les méthodes les plus importantes de la classe Service d'Android. En savoir 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 de : | QCoreApplication |
| Statut : | Aperçu technologique |
Cette classe est en avant-première technologique et est susceptible d'ê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 utilitaire qui regroupe 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 transmettant 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 transmettant argc et argv comme paramètres.
binder Cette méthode permet de créer une instance de binder lorsque cela est nécessaire.
Voir également QCoreApplication.
[virtual] QAndroidBinder *QAndroidService::onBind(const QAndroidIntent &intent)
L'utilisateur doit redéfinir cette méthode et renvoyer un « binder ».
Le paramètre ` intent ` contient toutes les informations relatives à l'appelant.
Le binder renvoyé est utilisé par l'appelant pour effectuer des appels IPC.
Avertissement : cette méthode est appelée depuis le thread de Binder, qui est différent du thread 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.