이 페이지에서

QAndroidService Class

Android Service 클래스의 가장 중요한 메서드들을 묶어 놓았습니다. 더 보기...

헤더: #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부터
상속: QCoreApplication
상태: 기술 미리보기

이 클래스는 기술 미리보기 단계에 있으며 변경될 수 있습니다.

공개 함수

QAndroidService(int &argc, char **argv)
QAndroidService(int &argc, char **argv, const std::function<QAndroidBinder *(const QAndroidIntent &)> &binder)
virtual QAndroidBinder *onBind(const QAndroidIntent &intent)

상세 설명

QAndroidService는 가장 중요한 Android Service 메서드를 래핑하는 편의 클래스입니다.

멤버 함수 문서

QAndroidService::QAndroidService(int &argc, char **argv)

argc 와 argv 를 매개변수로 전달하여 새로운 Android 서비스를 생성합니다.

QCoreApplication도 참조하십시오 .

QAndroidService::QAndroidService(int &argc, char **argv, const std::function<QAndroidBinder *(const QAndroidIntent &)> &binder)

argc 와 argv 를 매개변수로 전달하여 새로운 Android 서비스를 생성합니다.

binder 필요할 때 binder 를 생성하는 데 사용됩니다.

QCoreApplication도 참조하십시오 .

[virtual] QAndroidBinder *QAndroidService::onBind(const QAndroidIntent &intent)

사용자는 이 메서드를 재정의하여 바인더를 반환해야 합니다.

intent 매개변수에는 호출자에 대한 모든 정보가 포함되어 있습니다.

반환된 바인더는 호출자가 IPC 호출을 수행하는 데 사용됩니다.

경고: 이 메서드는 이 객체가 생성된 스레드와는 다른 Binder의 스레드에서 호출됩니다.

QAndroidBinder::onTransact 및 QAndroidBinder::transact도 참조하십시오 .

© 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.