Wraps the most important methods of Android Intent class. More...
| Header: | #include <QtCore/private/qandroidextras_p.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core)target_link_libraries(mytarget PRIVATE Qt6::CorePrivate) |
| qmake: | QT += core-private |
| Since: | Qt 6.2 |
| Status: | Preliminary |
This class is under development and is subject to change.
| QAndroidIntent() | |
| QAndroidIntent(const QJniObject &intent) | |
| QAndroidIntent(const QString &action) | |
| QAndroidIntent(const QJniObject &packageContext, const char *className) | |
| QByteArray | extraBytes(const QString &key) |
| QVariant | extraVariant(const QString &key) |
| QJniObject | handle() const |
| void | putExtra(const QString &key, const QByteArray &data) |
| void | putExtra(const QString &key, const QVariant &value) |
The QAndroidIntent is a convenience class that wraps the most important Android Intent methods.
Create a new intent
[explicit] QAndroidIntent::QAndroidIntent(const QJniObject &intent)Wraps the provided intent java object.
[explicit] QAndroidIntent::QAndroidIntent(const QString &action)Creates a new intent and sets the provided action.
[explicit] QAndroidIntent::QAndroidIntent(const QJniObject &packageContext, const char *className)Creates a new intent and sets the provided packageContext and the service className. Example:
auto serviceIntent = QAndroidIntent(QtAndroidPrivate::androidActivity().object(), "com.example.MyService");
See also QtAndroidPrivate::bindService.
Returns the extra key data from the Intent extras
Returns the extra key data from the Intent extras as a QVariant
The return value is useful to call other Java API which are not covered by this wrapper
Sets the key with the data in the Intent extras
Sets the key with the value in the Intent extras.
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: