cordova-plugin-hce icon indicating copy to clipboard operation
cordova-plugin-hce copied to clipboard

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

Open amz opened this issue 9 years ago • 2 comments

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

amz avatar Jan 07 '16 15:01 amz

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

don avatar Jan 14 '16 15:01 don

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

amz avatar Jan 14 '16 18:01 amz