QAndroidActivityResultReceiver 类

用于从主 Android 活动 onActivityResult() 回调的接口。 更多...

头: #include <QtCore/private/qandroidextras_p.h>
qmake: QT += core-private
Since: Qt 6.2
状态: Preliminary

该类在开发且可能改变。

公共函数

virtual void handleActivityResult (int receiverRequestCode , int resultCode , const QJniObject & data ) = 0

详细描述

Create a subclass of this class to be notified of the results when using the QtAndroidPrivate::startActivity() and QtAndroidPrivate::startIntentSender() API。

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)
					

成员函数文档编制

[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 () 或 QtAndroidPrivate::startIntentSender ()。 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().