flutter_nfc_kit
Android, iOS 및 웹에서 NFC 기능을 제공하며, 메타데이터 읽기, NDEF 레코드 읽기 및 쓰기, NFC 태그/카드와의 레이어 3 및 레이어 4 데이터 전송을 포함합니다
Android 및 iOS에서 NFC 기능을 제공하는 Flutter 플러그인으로, 메타데이터 읽기, NDEF 레코드 읽기 및 쓰기, NFC 태그/카드와의 레이어 3 및 레이어 4 데이터 전송 기능 포함
{"sdk":"flutter"}{"sdk":"flutter"}^4.8.1^0.4.0^3.1.1^1.2.0^1.1.1^1.1.0{"sdk":"flutter"}^6.0.0^2.4.9^6.7.1아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
pub version Test Build Example App
Yet another plugin to provide NFC functionality on Android, iOS and browsers (by WebUSB, see below).
This plugin's functionalities include:
Note that due to API limitations, not all operations are supported on all platforms. You are welcome to submit PRs to add support for any standard-specific operations.
This library uses ndef for NDEF record encoding & decoding.
Please refer to CONTRIBUTING.md for more information.
We have the following minimum version requirements for Android plugin:
jvmTarget in you app's build.gradle)To use this plugin on Android, you also need to:
AndroidManifest.xml.This plugin now supports Swift package manager, and requires iOS 13+.
Info.plist.Info.plist as needed. WARNING: for iOS 14.5 and earlier versions, you MUST add them before invoking poll with readIso18092 or readIso15693 enabled, or your NFC WILL BE TOTALLY UNAVAILABLE BEFORE REBOOT due to a CoreNFC bug.The web version of this plugin does not actually support NFC in browsers, but uses a specific WebUSB protocol, so that Flutter programs can communicate with dual-interface (NFC / USB) devices in a platform-independent way.
Make sure you understand the statement above and the protocol before using this plugin.
We provide simple code example and a example application.
Refer to the documentation for more information.
We use error codes with similar meaning as HTTP status code. Brief explanation and error cause in string (if available) will also be returned when an error occurs.
We provide two operation modes: polling (default) and event streaming. Both can give the same NFCTag object. Please see example for more details.
For Android applications, you can optimize NFC tag detection performance using the androidReaderModeFlags parameter:
// Skip automatic NDEF discovery for ~500ms faster detection
// and disable platform sounds for custom feedback
const flags = 0x80 | 0x100; // FLAG_READER_SKIP_NDEF_CHECK | FLAG_READER_NO_PLATFORM_SOUNDS
final tag = await FlutterNfcKit.poll(
androidReaderModeFlags: flags,
);
Common flags from NfcAdapter:
0x80 - FLAG_READER_SKIP_NDEF_CHECK: Skip automatic NDEF discovery, improving detection speed by ~500ms0x100 - FLAG_READER_NO_PLATFORM_SOUNDS: Disable system beep/vibration for custom audio/haptic feedbackThese flags are particularly useful for applications that: