03-04-2013 11:47 AM
Hi,
I am working on an NFC application and would like to know if the device NFC antenna is turned on or off on the device.
I am using the following method to check the same
DeviceCapability.isNFCAvailable()
But some times the OS if giving me wrong information.
So started looking for a class which gives exact information but could not find.
Could anyone help me.
03-04-2013 12:10 PM
03-04-2013 12:23 PM
Sorry to say that I am working on Blackberry java. The link you pointed is for BB10.
03-04-2013 04:04 PM - edited 03-05-2013 08:48 AM
I've used a combination of isNFCSupported and isNFCEnabled isNFCAvailable.
Can you expand on the behaviour that you are seeing?
Thanks!
03-05-2013 06:03 AM
Hi robbieDubya,
I need to show a customised popup informing the user to turn NFC antenna ON if it is OFF. Some times when using this method
DeviceCapability.isNFCAvailable()
it returns true even if antenna is turned off. So I cannot rely on this method.
Started looking for alternative methods in the API but could not find.
Hope this inormation helps.
Note : There is a method available in NFCManager.enableNFCByPrompt which might serve my purpose but I want to customise the message.
03-05-2013 08:04 AM
03-05-2013 08:49 AM
Should be accurate, can you confirm which build is running on the device(s) where you're seeing this behaviour?
03-05-2013 10:07 AM
Device : Blackberry 9900
Build : 7.1 Bundle 2061, (v 7.1.0.714,platform 5.1.0.532)
Most of the times it gives me correct NFC antenna status, but at times api gives me wrong information.
03-05-2013 10:38 AM
Do you have any steps to reproduce?
03-05-2013 11:18 AM
No particular steps, it occurs randomly.