nfc_in_flutter icon indicating copy to clipboard operation
nfc_in_flutter copied to clipboard

scan tag -> open app -> read data

Open hanlectin opened this issue 4 years ago • 7 comments

Dear All, I'm using nfc_in_flutter successfully. I manged to launch my (flutter-)application using the correct mime-type on my NFC/NDEF-tags. If my app is in the foreground, I can scan a tag an read it's data using NFC.readNDEF().listen(...)

but if my app is not in the foreground, scanning the tag brings opens the app (or brings the app into the foreground) but I need to rescan the tag in order to read it's data...

--> is there a way to carry out both steps with just one scan: open the app (or bring to the foreground) AND directly read the data on the tag without rescanning the tag?

thanks!

hanlectin avatar Jan 01 '21 21:01 hanlectin

Is this for Apple's new App Clips? Or is this for Android? Unfortunately I can't quite answer your question but I am looking to do the same for Apple's App Clips!

diarmuidmcg avatar Jan 02 '21 19:01 diarmuidmcg

Is this for Apple's new App Clips? Or is this for Android? Unfortunately I can't quite answer your question but I am looking to do the same for Apple's App Clips!

I primarily develop for Android. So currently this question is Android related... (however one reason for choosing Flutter was that hopefully my App works on iOS, too...)

hanlectin avatar Jan 02 '21 20:01 hanlectin

I believe you need a background NFC tag feature, nfc_in_flutter is not handling this issue, there's another plugin nfc_info that might help you. https://pub.dev/packages/nfc_info

xmany avatar Jan 30 '21 22:01 xmany

Is this for Apple's new App Clips? Or is this for Android? Unfortunately I can't quite answer your question but I am looking to do the same for Apple's App Clips!

App clip is a different story...

xmany avatar Jan 30 '21 22:01 xmany

Is this for Apple's new App Clips? Or is this for Android? Unfortunately I can't quite answer your question but I am looking to do the same for Apple's App Clips!

App clip is a different story...

yes I have realized as such... currently learning SwiftUI so i can completely rebuild my app so its small enough to be an app clip 🙃. at least I'm adding another tool to my tool belt!

diarmuidmcg avatar Jan 31 '21 17:01 diarmuidmcg

You can try to use uni_links plugin, although it will recognise a url deeplink as well, which may not be what you wanted. Hmm, I realised nfc_info can't do what you wanted either

xmany avatar Feb 03 '21 23:02 xmany

Hmm, I realised nfc_info can't do what you wanted either

ok - thanks! I planned to give it a try over the weekend... so maybe not then ;)

hanlectin avatar Feb 04 '21 07:02 hanlectin