Qt NFC 안드로이드에서
안드로이드에서 NDEF 메시지 핸들러 자동 실행하기
안드로이드는 NDEF 태그를 터치할 때 애플리케이션을 자동으로 실행할 수 있는 기능을 제공합니다.
이는 적절한 NFC 인텐트 필터가 포함된 안드로이드 매니페스트 파일 (AndroidManifest.xml)을 제공하면 가능합니다.
<intent-filter> <action android:name="android.nfc.action.NDEF_DISCOVERED"/> <category android:name="android.intent.category.DEFAULT"/> <data android:mimeType="text/plain"/> </intent-filter>
이 인텐트 필터를 활성화하면 NDEF NFC 태그를 터치하면 애플리케이션이 자동으로 시작됩니다.
참고: 대상 감지가 실제로 시작되기 전에 모든 GUI가 NFC 클래스에 연결되도록 애플리케이션을 설계하는 것이 중요합니다. 그렇지 않으면 애플리케이션 시작을 유발한 태그의 정보를 표시할 수 없습니다.
참고: 애플리케이션이 시작되고 정보를 읽을 수 있을 만큼 충분히 길게 태그를 터치하는 것이 중요합니다. 애플리케이션 시작 중에 태그를 잃어버리면 데이터를 사용할 수 없으며 태그를 다시 터치해야 합니다.
주석이 달린 URL 애플리케이션을 예로 참조하세요.
지원되는 태그 유형
Android에서 지원되는 태그 유형은 태그 기술 NdefFormatable 또는 Ndef를 사용하는 ACTION_NDEF_DISCOVERED, ACTION_TAG_DISCOVERED 및 ACTION_TECH_DISCOVERED입니다.
애플리케이션이 안드로이드 매니페스트 파일에 다른 유형을 등록하면 애플리케이션은 시작되지만 태그는 처리되지 않습니다.
© 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.