ChristophGeske/Near-Field-Communication-NFC-For-Unity-Android

[Question] Remove app selection on scanning

Opened this issue · 6 comments

Hi, so I managed to make this project work and it works great! Except that each time I scan a tag it ask me what app to use even tho I'm currently in the unity app. I have other nfc apps installed that don't do that but can't find how.
I'm on android 10 with unity 2020.3.5
Screenshot_20210712_200310_com android nfc

I do not get such a message running it on my Galaxy S10.
But I also dont have other NFC Apps installed.

I guess you can set the app as a default in your Android settings so the popup dissapears.

I am not sure if you can prevent that by adding a function or changing the settings in Unity.
Have you tried install a brand new app on your phone which also uses the NFC function. Maybe you already set your other NFC apps as the default and thats why you get the popup.

Stexe commented

There is a solution to it that was discussed on the Unity forms about NFC scanning on Android. I forget the solution offhand, but if you look around you should be able to find it.

So I searched a bit and you can't set the default NFC app also I tried multiple apps from the appstore and none have this problem. I'll try to search on unity forums then.

Ok I found a solution ! All is needed is adding NDEF tags support, it also allow to extract basic text from them.
Here is where I found the fix :
Unity Forum post

I also removed <uses-sdk android:minSdkVersion="21"/> to support latest version of the android sdk

Stexe commented

Yeah, that's the page I was talking about (you can see I've even Liked the posts and posted there before). Glad it worked out, I never got to test it much myself.

Ok I found a solution ! All is needed is adding NDEF tags support, it also allow to extract basic text from them. Here is where I found the fix : Unity Forum post

I also removed <uses-sdk android:minSdkVersion="21"/> to support latest version of the android sdk

Hey sorry for the bump. I implemented the code from that forum, he opens the standard NFC app not the one in the project. How can I fix this?