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
Posts: 78
Registered: ‎01-14-2013
My Device: Games
My Carrier: Not yet
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
Posts: 78
Registered: ‎01-14-2013
My Device: Games
My Carrier: Not yet

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.

Retired
Posts: 170
Registered: ‎09-06-2010
My Device: None
My Carrier: None

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.

Highlighted
Developer
Posts: 78
Registered: ‎01-14-2013
My Device: Games
My Carrier: Not yet

Re: [Catch NFC event - BB10]

Dear jomurray,

Thank you so much.

Best regards,

Dennis.