Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
dennisritchie
Posts: 78
Registered: ‎01-14-2013
My Device: Games
My Carrier: Not yet
Accepted Solution

[NFC Service - ON/OFF - when screen locked - BB10]

[ Edited ]

Dear RIM,

I have one question:

 

When device is locked, NFC service will be off. Do we have any way to NFC service still be on, when device be locked?

 

Thank you.

Best regards,

 

Dennis.

Please use plain text.
BlackBerry Development Advisor
jomurray
Posts: 121
Registered: ‎09-06-2010
My Device: Z30
My Carrier: Vodafone UK

Re: [NFC Service - ON/OFF - when screen locked]

If you're using card emulation mode then see here: 

 

https://developer.blackberry.com/native/reference/bb10/nfc_libref/topic/nfc_settings_t.html

 

and 

 

https://developer.blackberry.com/native/reference/bb10/nfc_libref/topic/nfc_set_setting.html

 

regarding the settings NFC_SETTING_CE_POWERED_OFF and NFC_SETTING_CE_BACKLIGHT_OFF that control how NFC transactions to the Secure Element are handled. These mirror the settings in Settings > NFC> Allow NFC Card Transactions.

 

When using reader-writer or peer to peer mode the application must be in the foreground visible to use NFC.

---------------------------------------
Please refrain from posting new questions in solved threads.
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Found a bug? Report it here
Follow me on Twitter @jcmrim
Please use plain text.
Developer
dennisritchie
Posts: 78
Registered: ‎01-14-2013
My Device: Games
My Carrier: Not yet

Re: [NFC Service - ON/OFF - when screen locked]

[ Edited ]

Dear friend,

I want to catch 2 events: "NFC_TAG_READWRITE_EVENT","NFC_TARGET_LOST_EVENT"

when device is locked, and my app is in background. I did with "Geolocation". Can I do with "NFC"?

Best regards,

Nguyen Thai Thuan.

Please use plain text.
BlackBerry Development Advisor
jomurray
Posts: 121
Registered: ‎09-06-2010
My Device: Z30
My Carrier: Vodafone UK

Re: [NFC Service - ON/OFF - when screen locked]

When the screen is locked the NFC radio is turned off (you can verify this if you have an external NFC reader) so it's unable to detect a passive target being presented to the handset -- there is no NFC radio field being generated by the handset for the passive target to interact with. Hence no NFC events related to presenting or removing a passive target (such as an NFC tag) will be generated.

 

As I noted earlier, in card emulation mode, an external reader (active target) is capable of interacting with a secure element in the handset over NFC even when the screen is locked or the device powered off ( this is configurable as noted earlier as well ) -- this is because the external reader is generating an NFC radio field that the handset ( as a passive target ) can interact with.

---------------------------------------
Please refrain from posting new questions in solved threads.
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Found a bug? Report it here
Follow me on Twitter @jcmrim
Please use plain text.
Developer
dennisritchie
Posts: 78
Registered: ‎01-14-2013
My Device: Games
My Carrier: Not yet

Re: [NFC Service - ON/OFF - when screen locked]

[ Edited ]

Dear friend,

I hope that RIM will support NFC likes Bluetooth, it is great. Because both of them are Radio Wave (in near field).

Best regards,

Dennis.

Please use plain text.