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
ekke
Posts: 1,595
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone
Accepted Solution

NFC Invoke App from Textrecord ?

I would like to open an APP from a NFC Tag.

 

These are my InvokationParameters:

 

<invoke-target id="org.xxxx.yyyy.actions">
    	<invoke-target-type>APPLICATION</invoke-target-type>
    	<filter>
    		<action>bb.action.OPEN</action>
    		<mime-type>application/vnd.rim.nfc.ndef</mime-type>
    		<property var="uris" value="ndef://1/T"/>
    	</filter>
    </invoke-target>

 Something like this is the payload of the Textrecord:

 

<uuid>#<id>
d894fce0-c6e5-11e3-a5e4-0002a5d5c51b#42

 If my app is open (in foreground) this works well, I'm checking at first if the UUID is correct to avoid scanning wrong NFC Tags with text - then depending on the ID doing my automated action inside the app.

 

Is there any way to define filters that way to open my app ?

so all NFC Tags with textRecord where payload starts with <uuid> automatically invokes my app ?

 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Developer
ekke
Posts: 1,595
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: NFC Invoke App from Textrecord ?

got a fast feedback from John Murray on Twitter (@jcmrim)

 

he confirmed that it's not possible to filter on a pattern in content of the text field

 

so I'll implement a custom type record

see also this article: http://devblog.blackberry.com/2012/10/blackberry-10-app-nfc/

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner