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

How can I check if HCE is available on currently running device #2

Open
amz opened this issue Jan 7, 2016 · 2 comments
Open

How can I check if HCE is available on currently running device #2

amz opened this issue Jan 7, 2016 · 2 comments

Comments

@amz
Copy link

amz commented Jan 7, 2016

It would be great if we could check if device supports hce before registering callback

@don
Copy link
Owner

don commented Jan 14, 2016

There is an Android method to check for HCE. The plugin needs a new API call to support this.

packageManager.hasSystemFeature(PackageManager.FEATURE_NFC_HOST_CARD_EMULATION)

Until then, you could limit the app to android-19 and greater and require HCE in the Manifest.

http://developer.android.com/guide/topics/connectivity/nfc/hce.html#ImplementingService
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_NFC_HOST_CARD_EMULATION

@amz
Copy link
Author

amz commented Jan 14, 2016

Meanwhile i have created an implementation of this. Please take o look at pull request #3.

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

2 participants