diff --git a/CHANGELOG.md b/CHANGELOG.md index 41cc7d8..04353c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ ## 0.0.1 -* TODO: Describe initial release. +* Initial release +* Support reading metadata of cards of standard ISO 14443-4 Type A & Type B (NFC-A / NFC-B / Mifare Classic / Mifare Ultralight) +* Support transceiving APDU with cards of standard ISO 7816 + +## 0.0.2 + +* Support reading metadata of cards of standard ISO 18092 / JIS 6319 (NFC-F / Felica) +* Support reading metadata of cards of standard ISO 15963 (NFC-V) +* Support reading GUID of China ID Card (which is non-standard) +* Add more documentation +* Release with MIT License diff --git a/LICENSE b/LICENSE index ba75c69..221cbe5 100644 --- a/LICENSE +++ b/LICENSE @@ -1 +1,21 @@ -TODO: Add your license here. +MIT License + +Copyright (c) 2020 nfc.im + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index bd0bb0b..cdf9884 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,27 @@ # Flutter NFC Kit -Flutter plugin to provide NFC functionality on Android and iOS. +Yet another plugin to provide NFC functionality on Android and iOS. + +This plugin supports: + +* read metadata of cards complying with: + * ISO 14443-4 Type A & Type B (NFC-A / NFC-B / Mifare Classic / Mifare Ultralight) + * ISO 18092 / JIS 6319 (NFC-F / Felica) + * ISO 15963 (NFC-V) + * China ID Card (non-standard, GUID only) +* transceive APDU with smart cards complying with ISO 7816 + +Note that due to API limitations not all operations are supported on both platforms. ## Setup -### Android Setup +Thank [nfc_manager](https://pub.dev/packages/nfc_manager) plugin to these instructions. + +### Android * Add [android.permission.NFC](https://developer.android.com/reference/android/Manifest.permission.html#NFC) to your `AndroidManifest.xml`. -### iOS Setup +### iOS * Add [Near Field Communication Tag Reader Session Formats Entitlements](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_nfc_readersession_formats) to your entitlements. @@ -18,4 +31,25 @@ Flutter plugin to provide NFC functionality on Android and iOS. ## Usage -To be done. +Simple example: + +```dart +import 'package:flutter_nfc_kit/flutter_nfc_kit.dart'; + +var availability = await FlutterNfcKit.nfcAvailability; +if (availability != NFCAvailability.available) { + // oh-no +} + +var tag = await FlutterNfcKit.poll(); +print(jsonEncode(tag)); +if (tag.type == NFCTagType.iso7816) { + var result = await FlutterNfcKit.transceive("00B0950000"); + print(result); +} +await FlutterNfcKit.finish(); +``` + +A more complicated example can be seen in `example` dir. + +Refer to the [documentation](https://pub.dev/documentation/flutter_nfc_kit/) for more information. diff --git a/example/README.md b/example/README.md index 0242904..06036fc 100644 --- a/example/README.md +++ b/example/README.md @@ -1,16 +1,3 @@ -# flutter_nfc_kit_example +# Example of flutter_nfc_kit -Demonstrates how to use the flutter_nfc_kit plugin. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. +We provide both Android and iOS examples in this project.