QAndroidParcel Class▲
-
Header: QtCore/private/qandroidextras_p.h
-
Since: Qt 6.2
-
qmake: QT += core-private
This class is under development and is subject to change.
Detailed Description▲
The QAndroidParcel is a convenience class that wraps the most important Android Parcel methods.
When building with CMake, use the following commands to use private Qt Core APIs:
find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::
CorePrivate)
Member Function Documentation▲
QAndroidParcel::QAndroidParcel()▲
Creates a new object.
[explicit] QAndroidParcel::QAndroidParcel(const int &parcel)▲
Wraps the parcel object.
int QAndroidParcel::handle() const▲
The return value is useful to call other Java API which are not covered by this wrapper
QAndroidBinder QAndroidParcel::readBinder() const▲
Returns the binder as a QAndroidBinder
QByteArray QAndroidParcel::readData() const▲
Returns the data as a QByteArray
int QAndroidParcel::readFileDescriptor() const▲
Returns the file descriptor
QVariant QAndroidParcel::readVariant() const▲
Returns the data as a QVariant
void QAndroidParcel::writeBinder(const QAndroidBinder &binder) const▲
Writes a binder object. This is useful for a client to send to a server a binder which can be used by the server callback the client.
void QAndroidParcel::writeData(const QByteArray &data) const▲
Writes the provided data as a byte array
void QAndroidParcel::writeFileDescriptor(int fd) const▲
Writes the provided fd.
void QAndroidParcel::writeVariant(const QVariant &value) const▲
Writes the provided value. The value is converted into a QByteArray before is written.