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
Accepted Solution

[Catch NFC event - BB10]

[ Edited ]

Dear Friends,

How to catch NFC event by Native APIs (from NDK, not use Cascade.) Although, I used "bps_initialize(); nfc_request_events" but have not got NFC event, yet.

I want to catch  seeing(attached) and (detached)removing event of a NFC  tag.

Thank you so much.

Best regards,

Dennis.

 

Developer
dennisritchie
Posts: 78
Registered: ‎01-14-2013
My Device: Games

Re: [Catch NFC event - BB10]

[ Edited ]

Dear Friends,

I think these functions can solve my current problem:

 

nfc_register_tag_readerwriter(TAG_TYPE_ALL);

bps_get_event

bps_event_get_domain

nfc_get_event_type

nfc_get_target

NFC_TAG_READWRITE_EVENT

NFC_TARGET_LOST_EVENT

 

Dennis.

BlackBerry Development Advisor
jomurray
Posts: 133
Registered: ‎09-06-2010
My Device: Z30

Re: [Catch NFC event - BB10]

You might want to take a look at this sample gode in GitHub written by myself (@jcmrim) and @mdwrim that uses BPS events to interact  wih NFC.

 

https://github.com/blackberry/Cascades-Community-Samples/tree/master/NfcTool

 

Take a look at NfcWorker.cpp which runs as a separate thread.

---------------------------------------
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
Developer
dennisritchie
Posts: 78
Registered: ‎01-14-2013
My Device: Games

Re: [Catch NFC event - BB10]

Dear jomurray,

Thank you so much.

Best regards,

Dennis.