![]() |
Qt 6.x
The Qt SDK
|
\inheaderfile QtCore/private/qandroidextras_p.h \preliminary \inmodule QtCorePrivate More...
#include <qandroidextras_p.h>
Public Member Functions | |
QAndroidIntent () | |
Create a new intent. | |
virtual | ~QAndroidIntent () |
QAndroidIntent (const QJniObject &intent) | |
Wraps the provided intent java object. | |
QAndroidIntent (const QString &action) | |
Creates a new intent and sets the provided action. | |
QAndroidIntent (const QJniObject &packageContext, const char *className) | |
Creates a new intent and sets the provided packageContext and the service className. | |
void | putExtra (const QString &key, const QByteArray &data) |
Sets the key with the data in the Intent extras. | |
QByteArray | extraBytes (const QString &key) |
Returns the extra key data from the Intent extras. | |
void | putExtra (const QString &key, const QVariant &value) |
Sets the key with the value in the Intent extras. | |
QVariant | extraVariant (const QString &key) |
Returns the extra key data from the Intent extras as a QVariant. | |
QJniObject | handle () const |
The return value is useful to call other Java API which are not covered by this wrapper. | |
\inheaderfile QtCore/private/qandroidextras_p.h \preliminary \inmodule QtCorePrivate
Wraps the most important methods of Android Intent class.
The QAndroidIntent is a convenience class that wraps the most important \l {https://developer.android.com/reference/android/content/Intent.html}{Android Intent} methods.
qtcoreprivate-usage
Definition at line 126 of file qandroidextras_p.h.
QAndroidIntent::QAndroidIntent | ( | ) |
Create a new intent.
Definition at line 695 of file qandroidextras.cpp.
|
virtual |
Definition at line 701 of file qandroidextras.cpp.
|
explicit |
Wraps the provided intent java object.
Definition at line 707 of file qandroidextras.cpp.
|
explicit |
Creates a new intent and sets the provided action.
Definition at line 715 of file qandroidextras.cpp.
|
explicit |
Creates a new intent and sets the provided packageContext and the service className.
Example:
Definition at line 731 of file qandroidextras.cpp.
QByteArray QAndroidIntent::extraBytes | ( | const QString & | key | ) |
Returns the extra key data from the Intent extras.
Definition at line 757 of file qandroidextras.cpp.
References Qt::Uninitialized.
Referenced by extraVariant().
Returns the extra key data from the Intent extras as a QVariant.
Definition at line 788 of file qandroidextras.cpp.
References extraBytes().
QJniObject QAndroidIntent::handle | ( | ) | const |
The return value is useful to call other Java API which are not covered by this wrapper.
Definition at line 799 of file qandroidextras.cpp.
Referenced by QtAndroidPrivate::bindService(), and QtAndroidPrivate::startActivity().
void QAndroidIntent::putExtra | ( | const QString & | key, |
const QByteArray & | data | ||
) |
Sets the key with the data in the Intent extras.
Definition at line 741 of file qandroidextras.cpp.
Referenced by putExtra().
Sets the key with the value in the Intent extras.
Definition at line 777 of file qandroidextras.cpp.
References putExtra(), and QIODeviceBase::WriteOnly.