From 7396e8f992c9249613ac18f8866fce016016a0bb Mon Sep 17 00:00:00 2001 From: Lange99 Date: Thu, 17 Dec 2020 22:43:40 +0100 Subject: [PATCH] aggiunto readme --- README.md | 27 ++++++++++++++++++--------- lib/NfcKeyManager.dart | 5 +---- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 1f7e259..289acaa 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,25 @@ # nfc_app -A new Flutter application. +App that allows the management of nfc tags -## Getting Started +## Functions -This project is a starting point for a Flutter application. +This application allows you to enable the reading of a tag through the id. -A few resources to get you started if this is your first Flutter project: +There are 2 ways to enable a tag: +1) By manually inserting the key in the "TagManager" section +2) By scanning the Tag in the "ReadMode" section -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) +If the tag is not enabled and has never been read, in the event of an access attempt, it will have 3 possibilities to be enabled. +If it is not enabled within the third attempt, the tag will be blocked. +If it is enabled before the third attempt, the attempts will be reset. -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. +If a tag is blocked it is always possible to unlock it by enabling it. + +The library used to read the tag is: +- [flutter_nfc_kit](https://pub.dev/packages/flutter_nfc_kit) + +The supported tags for reading are: +* ISO 14443 Type A & Type B (NFC-A / NFC-B / MIFARE Classic / MIFARE Plus / MIFARE Ultralight / MIFARE DESFire) +* ISO 18092 (NFC-F / FeliCa) +* ISO 15963 (NFC-V) \ No newline at end of file diff --git a/lib/NfcKeyManager.dart b/lib/NfcKeyManager.dart index 76e1f68..99febc9 100644 --- a/lib/NfcKeyManager.dart +++ b/lib/NfcKeyManager.dart @@ -91,11 +91,8 @@ class NfcManager { } else { log.add(tag.id + ": Attempts exhausted, tag locked"); print('Non più leggibile'); - - //TODO: ELIMINAZIONE DEL CONTENUTO DAL TAG deniedKey.add(tag.id); - attempts.remove(tag - .id); //lo elimino dalla lista dei tentativi, se un giorno riabilitassi e bloccassi questo tag, avrà altri 3 tentativi + attempts.remove(tag.id); //lo elimino dalla lista dei tentativi, se un giorno riabilitassi e bloccassi questo tag, avrà altri 3 tentativi return -1; } } else {