QAndroidActivityResultReceiver Class
Interface used for callbacks from onActivityResult() in the main Android activity. More...
Header: | #include <QtCore/private/qandroidextras_p.h> |
qmake: | QT += core-private |
Since: | Qt 6.2 |
This class is under development and is subject to change.
Public Functions
virtual void | handleActivityResult(int receiverRequestCode, int resultCode, const QJniObject &data) = 0 |
Detailed Description
Create a subclass of this class to be notified of the results when using the QtAndroidPrivate::startActivity()
and QtAndroidPrivate::startIntentSender()
APIs.
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
[pure virtual]
void QAndroidActivityResultReceiver::handleActivityResult(int receiverRequestCode, int resultCode, const QJniObject &data)
Reimplement this function to get activity results after starting an activity using either QtAndroidPrivate::startActivity() or QtAndroidPrivate::startIntentSender(). The receiverRequestCode is the request code unique to this receiver which was originally passed to the startActivity() or startIntentSender() functions. The resultCode is the result returned by the activity, and data is either null or a Java object of the class android.content.Intent. Both the last to arguments are identical to the arguments passed to onActivityResult().
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.