QtAndroidPrivate Namespace | Qt Core (original) (raw)
The QtAndroidPrivate namespace provides miscellaneous functions to aid Android development. More...
This namespace is under development and is subject to change.
Function Documentation
[since 6.2]
bool QtAndroidPrivate::bindService(const QAndroidIntent &serviceIntent, const QAndroidServiceConnection &serviceConnection, QtAndroidPrivate::BindFlags flags = BindFlag::None)
Binds the service given by serviceIntent, serviceConnection and flags. The serviceIntent object identifies the service to connect to. The serviceConnection is a listener that receives the information as the service is started and stopped.
Returns true on success
See Android documentation documentation for more details.
This function was introduced in Qt 6.2.
See also QAndroidIntent, QAndroidServiceConnection, and BindFlag.
[preliminary]
QFutureQtAndroidPrivate::PermissionResult\ QtAndroidPrivate::checkPermission(const QString &permission)
This function is under development and is subject to change.
Checks whether this process has the named permission and returns a QFuture representing the result of the check.
Note: QPermission is the recommended API to use for requesting permissions. If QPermission doesn't cover an Android permission you want to request, this preliminary API can still used instead.
This function was introduced in Qt 6.2.
See also requestPermission().
[preliminary]
QFutureQtAndroidPrivate::PermissionResult\ QtAndroidPrivate::requestPermission(const QString &permission)
This function is under development and is subject to change.
Requests the permission and returns a QFuture representing the result of the request.
Note: QPermission is the recommended API to use for requesting permissions. If QPermission doesn't cover an Android permission you want to request, this preliminary API can still used instead.
This function was introduced in Qt 6.2.
See also checkPermission().
[since 6.2]
void QtAndroidPrivate::startActivity(const QAndroidIntent &intent, int receiverRequestCode, QAndroidActivityResultReceiver *resultReceiver = nullptr)
Starts the activity given by intent and provides the result asynchronously through the resultReceiver if this is non-null.
If resultReceiver is null, then the startActivity()
method of QNativeInterface::QAndroidApplication::context() will be called. Otherwise startActivityForResult()
will be called.
The receiverRequestCode is a request code unique to the resultReceiver, and will be returned along with the result, making it possible to use the same receiver for more than one intent.
This function was introduced in Qt 6.2.
[since 6.2]
void QtAndroidPrivate::startActivity(const QJniObject &intent, int receiverRequestCode, QAndroidActivityResultReceiver *resultReceiver = nullptr)
Starts the activity given by intent and provides the result asynchronously through the resultReceiver if this is non-null.
If resultReceiver is null, then the startActivity()
method of QNativeInterface::QAndroidApplication::context() will be called. Otherwise startActivityForResult()
will be called.
The receiverRequestCode is a request code unique to the resultReceiver, and will be returned along with the result, making it possible to use the same receiver for more than one intent.
This function was introduced in Qt 6.2.
[since 6.2]
void QtAndroidPrivate::startActivity(const QJniObject &intent, int receiverRequestCode, std::function<void (int, int, const QJniObject &)> callbackFunc)
Starts the activity given by intent, using the request code receiverRequestCode, and provides the result by calling callbackFunc.
This function was introduced in Qt 6.2.
[since 6.2]
void QtAndroidPrivate::startIntentSender(const QJniObject &intentSender, int receiverRequestCode, QAndroidActivityResultReceiver *resultReceiver = nullptr)
Starts the activity given by intentSender and provides the result asynchronously through the resultReceiver if this is non-null.
If resultReceiver is null, then the startIntentSender()
method of QNativeInterface::QAndroidApplication::context() will be called. Otherwise startIntentSenderForResult()
will be called.
The receiverRequestCode is a request code unique to the resultReceiver, and will be returned along with the result, making it possible to use the same receiver for more than one intent.
This function was introduced in Qt 6.2.