QAndroidService Class
| Header: | #include <QAndroidService> |
| qmake: | QT += androidextras |
| Since: | Qt 5.10 |
| Inherits: | QCoreApplication |
This class was introduced in Qt 5.10.
Public Functions
| QAndroidService(int &argc, char **argv, const std::function<QAndroidBinder *(const QAndroidIntent &)> &binder) | |
| QAndroidService(int &argc, char **argv) | |
| virtual QAndroidBinder * | onBind(const QAndroidIntent &intent) |
- 3 public functions inherited from QCoreApplication
- 30 public functions inherited from QObject
Related Non-Members
| typedef | QObjectList |
| void | qAddPostRoutine(QtCleanUpFunction ptr) |
| QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
| void | qRemovePostRoutine(QtCleanUpFunction ptr) |
| T | qobject_cast(QObject *object) |
| T | qobject_cast(const QObject *object) |
Macros
| QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
| Q_CLASSINFO(Name, Value) | |
| Q_COREAPP_STARTUP_FUNCTION(ptr) | |
| Q_DECLARE_TR_FUNCTIONS(context) | |
| Q_DISABLE_COPY(Class) | |
| Q_DISABLE_COPY_MOVE(Class) | |
| Q_DISABLE_MOVE(Class) | |
| Q_EMIT | |
| Q_ENUM(...) | |
| Q_ENUM_NS(...) | |
| Q_FLAG(...) | |
| Q_FLAG_NS(...) | |
| Q_GADGET | |
| Q_INTERFACES(...) | |
| Q_INVOKABLE | |
| Q_NAMESPACE | |
| Q_OBJECT | |
| Q_PROPERTY(...) | |
| Q_REVISION | |
| Q_SET_OBJECT_NAME(Object) | |
| Q_SIGNAL | |
| Q_SIGNALS | |
| Q_SLOT | |
| Q_SLOTS |
Additional Inherited Members
- 5 properties inherited from QCoreApplication
- 1 property inherited from QObject
- 1 public slot inherited from QCoreApplication
- 1 public slot inherited from QObject
- 5 signals inherited from QCoreApplication
- 2 signals inherited from QObject
- 38 static public members inherited from QCoreApplication
- 9 static public members inherited from QObject
- 1 protected function inherited from QCoreApplication
- 9 protected functions inherited from QObject
Detailed Description
The QAndroidService is a convenience class that wraps the most important Android Service methods.
Member Function Documentation
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 QCoreApplication.
QAndroidService::QAndroidService(int &argc, char **argv)
Creates a new Android service, passing argc and argv as parameters.
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.
Warning: This method is called from Binder's thread which is different from the thread that this object was created.
See also QAndroidBinder::onTransact and QAndroidBinder::transact.