QAndroidService Class
Envuelve los métodos más importantes de la clase «Service» de Android. Más...
| Encabezado: | #include <QtCore/private/qandroidextras_p.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS CorePrivate) target_link_libraries(mytarget PRIVATE Qt6::CorePrivate) |
| qmake: | QT += core-private |
| Desde: | Qt 6.2 |
| Heredado de: | QCoreApplication |
| Estado: | Vista previa tecnológica |
Esta clase se encuentra en fase de vista previa tecnológica y está sujeta a cambios.
Funciones públicas
| QAndroidService(int &argc, char **argv) | |
| QAndroidService(int &argc, char **argv, const std::function<QAndroidBinder *(const QAndroidIntent &)> &binder) | |
| virtual QAndroidBinder * | onBind(const QAndroidIntent &intent) |
Descripción detallada
QAndroidService es una clase de conveniencia que agrupa los métodos más importantes de Android Service.
Documentación de las funciones de miembro
QAndroidService::QAndroidService(int &argc, char **argv)
Crea un nuevo servicio de Android, pasando argc y argv como parámetros.
Véase también QCoreApplication.
QAndroidService::QAndroidService(int &argc, char **argv, const std::function<QAndroidBinder *(const QAndroidIntent &)> &binder)
Crea un nuevo servicio de Android, pasando argc y argv como parámetros.
binder Se utiliza para crear un binder cuando sea necesario.
Véase también QCoreApplication.
[virtual] QAndroidBinder *QAndroidService::onBind(const QAndroidIntent &intent)
El usuario debe sobrescribir este método y devolver un binder.
El parámetro ` intent ` contiene toda la información del llamante.
El binder devuelto es utilizado por el llamante para realizar llamadas IPC.
Advertencia: Este método se invoca desde el hilo de Binder, que es diferente del hilo en el que se creó este objeto.
Véase también QAndroidBinder::onTransact y 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.