IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QAndroidService Class

Wraps the most important methods of Android Service class.

This class was introduced in Qt 6.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QAndroidService Class

  • Header: QtCore/private/qandroidextras_p.h

  • Since: Qt 6.2

  • qmake: QT += core-private

  • Inherits: QCoreApplication

This class is under development and is subject to change.

Detailed Description

The QAndroidService is a convenience class that wraps the most important Android Service methods.

When building with CMake, use the following commands to use private Qt Core APIs:

 
Sélectionnez
find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::CorePrivate)

Member Function Documentation

 

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

Creates a new Android service, passing argc and argv as parameters.

See Also

See also QCoreApplication

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

Creates a new Android service, passing argc and argv as parameters.

binder is used to create a binder when needed.

See Also

See also QCoreApplication

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

The user must override this method and to return a binder.

The intent parameter contains all the caller information.

The returned binder is used by the caller to perform IPC calls.

This method is called from Binder's thread which is different from the thread that this object was created.

See Also

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+