nfc_pro_manager 3.0.1
nfc_pro_manager: ^3.0.1 copied to clipboard
The industry-grade NFC SDK for Flutter. Supports robust Host Card Emulation (HCE), Identity Emulation, NDEF Read/Write, and ISO-DEP APDU communication with enterprise lifecycle management.
NFC Pro Manager ππ #
The industry-grade NFC SDK for Flutter.
Engineered for high-security environments, enterprise lifecycle management, and bank-grade HCE compliance.
π₯ What's New in v3.0.0 (The Professional Rebranding) #
- Professional Identity: Migrated to
com.nfcpro.managernamespace for production credibility. - Diamond Lifecycle: Automated session suspension when app enters background via
DefaultLifecycleObserver. - Bank-Grade HCE: Full ISO 7816-4 FCI Template support (6F -> 84 -> A5).
- Atomic Concurrency: Lock-free hardware access using
AtomicBooleanfor extreme reliability. - Real-time Presence: Detection of card removal via
isTagPresent().
π Features #
- β HCE (Host Card Emulation): Clone identities or emulate smart cards.
- β ISO-DEP / APDU: Full support for banking, e-money, and access cards.
- β NDEF Support: Read/Write Text and URI records with multi-record support.
- β Persistent Connection: Keep connections alive for multiple APDU exchanges.
- β Event Buffering: No data loss during application startup.
- β Cross Platform: Robust implementation for both Android and iOS.
π Getting Started #
Installation #
Add this to your pubspec.yaml:
dependencies:
nfc_pro_manager: ^3.0.0
Android Configuration #
Ensure your AndroidManifest.xml includes:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.your.app.id">
<uses-permission android:name="android.permission.NFC" />
<uses-feature android:name="android.hardware.nfc" android:required="false" />
</manifest>
π Usage #
Start Scanning #
import 'package:nfc_pro_manager/nfc_pro_manager.dart';
void startNfc() async {
await NfcPro.startSession(
onDiscovered: (tag) {
print("Tag Found: ${tag.uid}");
},
onError: (exception) {
print("NFC Error: ${exception.message}");
},
);
}
Transceive APDU (Smart Cards) #
String? response = await NfcPro.transceive("00A4040007F001020304050600");
runScript (APDU Batch) #
List<String?> responses = await NfcPro.runScript([
NfcApdu.selectAid("F0010203040506"),
NfcApdu.readBinary(sfi: 1, offset: 0),
]);
Identity Emulation (HCE) #
await NfcPro.setEmulationId("PRO-IDENTITY-123");
π Support Matrix #
| Feature | Android | iOS |
|---|---|---|
| Tag Reading | β | β |
| NDEF Write | β | β |
| HCE (Emulation) | β | β |
| APDU (ISO-DEP) | β | β |
| FeliCa | β | β |
| MiFare | β | β |
π€ Contributing #
Contributions are welcome! Please feel free to submit a Pull Request.
π License #
This project is licensed under the MIT License - see the LICENSE file for details.