Wraps the most important methods of Android ServiceConnection class. More...
Header: | #include <QtCore/private/qandroidextras_p.h> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS CorePrivate) target_link_libraries(mytarget PRIVATE Qt6::CorePrivate) |
qmake: | QT += core-private |
Since: | Qt 6.2 |
This class is under development and is subject to change.
QAndroidServiceConnection(const QJniObject &serviceConnection) | |
QAndroidServiceConnection() | |
QJniObject | handle() const |
virtual void | onServiceConnected(const QString &name, const QAndroidBinder &serviceBinder) = 0 |
virtual void | onServiceDisconnected(const QString &name) = 0 |
The QAndroidServiceConnection is a convenience abstract class which wraps the AndroidServiceConnection interface.
It is useful when you perform a QtAndroidPrivate::bindService operation.
Creates a new object from an existing serviceConnection.
It's useful when you have your own Java implementation. Of course onServiceConnected()/onServiceDisconnected() will not be called anymore.
Creates a new object
returns the underline QJniObject
[pure virtual]
void QAndroidServiceConnection::onServiceConnected(const QString &name, const QAndroidBinder &serviceBinder)This notification is called when the client managed to connect to the service. The name contains the server name, the serviceBinder is the binder that the client uses to perform IPC operations.
Warning: This method is called from Binder's thread which is different from the thread that this object was created.
returns the underline QJniObject
[pure virtual]
void QAndroidServiceConnection::onServiceDisconnected(const QString &name)Called when a connection to the Service has been lost. The name parameter specifies which connectioen was lost.
Warning: This method is called from Binder's thread which is different from the thread that this object was created.
returns the underline QJniObject
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: