okadan / nfc-manager Goto Github PK
View Code? Open in Web Editor NEWA Flutter app for accessing the NFC features on Android and iOS.
A Flutter app for accessing the NFC features on Android and iOS.
To use (nfcv,ndef) read, write and tranceive payload message examples and code preview
Hi
I'm using an iPhone XR with iOS 14.3 & and a BlackView BV9600 with Android 9.0.
Everything work well on the Android but it not work at all on the iPhone.
// NfcManager.instance.isAvailable() is true
I just get these two logs on iPhone when I tap "Start scan":
[CoreNFC] 00000002 8285b180 -[NFCHardwareManager queueReaderSession:sessionConfig:completionHandler:]:96 error=Error Domain=NFCError Code=203 "System resource unavailable" UserInfo={NSLocalizedDescription=System resource unavailable} [CoreNFC] 00000002 81a7c360 -[NFCTagReaderSession beginSessionWithConfig:]:365 error:Error Domain=NFCError Code=203 "System resource unavailable" UserInfo={NSLocalizedDescription=System resource unavailable}, errorCode: 0xcb
Are you aware of this problem ?
It seems that it is due to iOS 14.
People with same problem shared some ideas maybe it can help you for a future "hotfix" update:
I am trying to run the app but im getting the following error:
_* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @4d1f16e8_
Hi,
I've downloaded the code, opened it into my Android studio but it won't launch...
The "Run green triangle" is just disabled...
Don't have any errors neither so...
Any idea ? :s
I have added a fork of this repo as a dependency in my flutter project, when I run the TagReadPage.withDependency then click on startsession I get these two errors in xcode:
-[NFCHardwareManager queueReaderSession:sessionConfig:completionHandler:]:105 error=Error Domain=NFCError Code=203 "System resource unavailable" UserInfo={NSLocalizedDescription=System resource unavailable}
-[NFCTagReaderSession beginSessionWithConfig:]:459 error:Error Domain=NFCError Code=203 "System resource unavailable" UserInfo={NSLocalizedDescription=System resource unavailable}, errorCode: 0xcb
I see that issues like this have occurred before so please help
I tried to lock using writelock function with package version (3.3.0) and failed on both android and iOS within app crashed. When I tried with another package version (3.1.0), it work on iOS but failed and crashed in android.
How can i only read and get the UID of the nfc card ?
I am using this example
https://pub.dev/packages/nfc_manager/example
I will try to explain. I have tested your repo and installed it on an Android device and it works great, if for example you bring an nfc tag close when the APP is open the native NFC reader of Android is not launched and that's great.. So you avoid being pulled out of the APP.
What's the problem? I have been unable to replicate this behavior in a new app. I have literally moved every file and every import but nothing, if I bring an NFC tag close without me starting StartSession it automatically opens the native NFC reader.
How did you guys manage it? Is there something in manifest, gradle, etc... that you have modified that is achieving that?
Regards
Is there no MifareClassic.connect() method?
MifareClassic? mifareClassic = MifareClassic.from(tag);
if (mifareClassic == null) {
print('Tag is not MifareClassic.');
return;
}
Uint8List uint8list = Uint8List.fromList([0x81, 0xE6, 0x33, 0x0D, 0xEE, 0x4F]);
bool oneAuth = await mifareClassic.authenticateSectorWithKeyA(
sectorIndex: 1, key: uint8list);
if (oneAuth) {
Uint8List oneBlockData = await mifareClassic.readBlock(blockIndex: 1);
String oneData = String.fromCharCodes(oneBlockData);
}
Apple has launched iOS 16.1 which allows deleting wallet meaning they allow other developers to access the API
The app does not recognize whether the NFC are on or off. so reading with off NFC would not read any error
Is it possible to keep the session alive and read multiple tags? This is possible with android, not having much luck with iOS
Hi,
There is currently no warning about what the locking page is going to do, and the fact that it is permanent. Well, actually, it looks like there should be in the source code, but it doesn't appear on screen.
Please fix this ASAP as I now have a useless NFC tag, and I don't want other people to be in the same situation!
Thanks ๐
I tried to test this example app to write to 'tagV, but unfortunately it throws an error saying 'Stack error'. Is there any way to solve this problem?
Steps Followed (Only IOS):
Launch app -> Ndef Write -> Add record -> Added a record of type 'Text' -> Start scan -> Error message (Stack error).
Hi,
I downloaded NFC Manager from Play store and install it on two android phones, and trying to make them communicate through NFC but nothing happen. From one side I clicked on NDEF- Write and add record (text), then start session and on the other side I clicked on NDEF -read and start session. The two phones are near each other but nothing happen.
Thanks for helping
Swift now considers previously correct code incorrect. This regards two lazy var
s in this library that are marked with @available(iOS 13.0, *)
.
The StackOverflow answer details a possible solution. I have also linked the Swift commit which changes the behavior.
https://stackoverflow.com/a/51250282/1390727
apple/swift#41112
Scenario: When the mobile app is trying to scan the nfcV tag using 'OnDiscovered' method, and due to some interruptions (like may be user suddenly removed the tag in between before complete scan), an error occurs called
Exception has occurred. PlatformException (PlatformException(io_exception, Tag was lost., null)).
I tried to handle this with 'onError' method, but still error doesn't get caught.
Any suggestions how to handle this?
What is the best way to erase an NFC tag using your package?
I don't see an ndef.erase
or similarly named method.
The tag
object that is received in the onDiscovered
doesn't have ndef data on iOS, it works fine on android
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.