QAndroidIntent Class
Android Intent 클래스의 가장 중요한 메서드들을 감싸고 있습니다. 더 보기...
| 헤더: | #include <QtCore/private/qandroidextras_p.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS CorePrivate) target_link_libraries(mytarget PRIVATE Qt6::CorePrivate) |
| qmake: | QT += core-private |
| 다음부터: | Qt 6.2부터 |
| 상태: | 기술 미리보기 |
이 클래스는 기술 미리보기 단계에 있으며 변경될 수 있습니다.
공개 함수
| QAndroidIntent() | |
| QAndroidIntent(const QJniObject &intent) | |
| QAndroidIntent(const QString &action) | |
| QAndroidIntent(const QJniObject &packageContext, const char *className) | |
| QByteArray | extraBytes(const QString &key) |
| QVariant | extraVariant(const QString &key) |
| QJniObject | handle() const |
| void | putExtra(const QString &key, const QByteArray &data) |
| void | putExtra(const QString &key, const QVariant &value) |
상세 설명
QAndroidIntent는 가장 중요한 Android Intent 메서드를 래핑하는 편의 클래스입니다.
멤버 함수 문서
QAndroidIntent::QAndroidIntent()
새로운 인텐트 생성하기
[explicit] QAndroidIntent::QAndroidIntent(const QJniObject &intent)
지정된 ` intent ` 자바 객체를 감쌉니다.
[explicit] QAndroidIntent::QAndroidIntent(const QString &action)
새로운 인텐트를 생성하고, 제공된 ` action`를 설정합니다.
[explicit] QAndroidIntent::QAndroidIntent(const QJniObject &packageContext, const char *className)
새로운 인텐트를 생성하고, 제공된 packageContext 및 서비스 className 을 설정합니다. 예시:
auto serviceIntent = QAndroidIntent(QtAndroidPrivate::androidActivity().object(), "com.example.MyService");QtAndroidPrivate::bindService도 참조하십시오 .
QByteArray QAndroidIntent::extraBytes(const QString &key)
Intent 엑스트라에서 추가적인 key 데이터를 반환합니다.
QVariant QAndroidIntent::extraVariant(const QString &key)
Intent 엑스트라에서 추가 key 데이터를 QVariant
QJniObject QAndroidIntent::handle() const
이 반환 값은 이 래퍼에서 다루지 않는 다른 Java API를 호출할 때 유용합니다.
void QAndroidIntent::putExtra(const QString &key, const QByteArray &data)
Intent 엑스트라에 data 를 사용하여 key 를 설정합니다.
void QAndroidIntent::putExtra(const QString &key, const QVariant &value)
Intent의 추가 정보(extras)에 value 를 사용하여 key 를 설정합니다.
© 2026 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.