QAndroidActivityResultReceiver Class
AndroidのメインアクティビティのonActivityResult()からのコールバックに使用されるインターフェースです。詳細...
ヘッダー | #include <QtCore/private/qandroidextras_p.h> |
CMakeの | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::CorePrivate) |
qmake: | QT += core-private |
以来: | Qt 6.2 |
ステータス | 暫定版 |
このクラスは開発中であり、変更される可能性があります。
パブリック関数
virtual void | handleActivityResult(int receiverRequestCode, int resultCode, const QJniObject &data) = 0 |
詳細説明
このクラスのサブクラスを作成し、QtAndroidPrivate::startActivity()
およびQtAndroidPrivate::startIntentSender()
API を使用する際に結果を通知するようにします。
メンバ関数のドキュメント
[pure virtual]
void QAndroidActivityResultReceiver::handleActivityResult(int receiverRequestCode, int resultCode, const QJniObject &data)
この関数を再実装して、QtAndroidPrivate::startActivity()またはQtAndroidPrivate::startIntentSender()を使用してアクティビティを開始した後に、アクティビティ結果を取得する。receiverRequestCode は、もともと startActivity() または startIntentSender() 関数に渡された、この受信機固有のリクエストコードです。resultCode はアクティビティから返された結果であり、data はnullかandroid.content.IntentクラスのJavaオブジェクトである。最後の引数はいずれも、onActivityResult()に渡される引数と同じです。
© 2025 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.