Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't scan NFC by asus nexus 7 #28

Open
glorylife17 opened this issue May 25, 2018 · 1 comment
Open

I can't scan NFC by asus nexus 7 #28

glorylife17 opened this issue May 25, 2018 · 1 comment

Comments

@glorylife17
Copy link

I use the NFCForms in my project. I try to Installer the app for two phones. one is sony Z5, the other is nexus 7. I can use fine in sony Z5, but I can't scan in nexus 7.
nexus 7 doesn't happen in OnPause(), Why?
I try to find NFCtools, I can scan MifareClassic card in sony Z5 and nexus 7.

@glorylife17
Copy link
Author

protected override void OnResume () { base.OnResume (); if (NFCdevice != null) { var intent = new Intent (this, GetType ()).AddFlags (ActivityFlags.SingleTop); NFCdevice.EnableForegroundDispatch ( this, PendingIntent.GetActivity (this, 0, intent, 0), new[] { new IntentFilter (NfcAdapter.ActionTechDiscovered) }, new String[][] {new string[] { NFCTechs.Ndef, }, new string[] { NFCTechs.MifareClassic, }, } ); } }

NfcAdapter.ActionTechDiscovered > NfcAdapter.ActionTagDiscovered

NfcAdapter.ActionTechDiscovered
Intent to start an activity when a tag is discovered and activities are registered for the specific technologies on the tag.

To receive this intent an activity must include an intent filter for this action and specify the desired tech types in a manifest meta-data entry. Here is an example manfiest entry:

NfcAdapter.ActionTagDiscovered
Intent to start an activity when a tag is discovered.
This intent will not be started when a tag is discovered if any activities respond to NfcAdapter.ActionNdefDiscovered or NfcAdapter.ActionTechDiscovered for the current tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant