QAndroidIntent Class
안드로이드 인텐트 클래스의 가장 중요한 메서드를 래핑합니다. 더 보기...
Header: | #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 |
상태: | 예비 |
이 클래스는 개발 중이며 변경될 수 있습니다.
공용 함수
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는 가장 중요한 안드로이드 인텐트 메서드를 래핑하는 편의 클래스입니다.
멤버 함수 문서
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)
인텐트 엑스트라에서 추가 key 데이터를 반환합니다.
QVariant QAndroidIntent::extraVariant(const QString &key)
인텐트 엑스트라의 추가 key 데이터를 QVariant
QJniObject QAndroidIntent::handle() const
반환 값은 이 래퍼에 포함되지 않는 다른 Java API를 호출하는 데 유용합니다.
void QAndroidIntent::putExtra(const QString &key, const QByteArray &data)
인텐트 엑스트라에서 data 을 key 으로 설정합니다.
void QAndroidIntent::putExtra(const QString &key, const QVariant &value)
인텐트 엑스트라에서 value 을 key 으로 설정합니다.
© 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.