QAndroidService Class
Envuelve los métodos más importantes de la clase Android Service. Más...
| Cabecera: | #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 |
| Hereda de: | QCoreApplication |
| Estado: | Preliminar |
Esta clase está en desarrollo 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 envuelve los métodos más importantes de Android Service.
Documentación de las funciones de los miembros
QAndroidService::QAndroidService(int &argc, char **argv)
Crea un nuevo servicio 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 Android, pasando argc y argv como parámetros.
binder se utiliza para crear un binder cuando es necesario.
Véase también QCoreApplication.
[virtual] QAndroidBinder *QAndroidService::onBind(const QAndroidIntent &intent)
El usuario debe anular este método y para devolver una carpeta.
El parámetro intent contiene toda la información del llamante.
El binder devuelto es utilizado por el llamador para realizar llamadas IPC.
Advertencia: Este método es llamado desde el hilo de Binder que es diferente del hilo en el que este objeto fue creado.
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.