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

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 16
Registered: ‎08-14-2012
My Device: blackberry 10 dev alpha
My Carrier: China unicom

[HELP]Is there a way to Invoke NFC APIS in BlackBerry 10 Webworks(Html5 Development) ?

[ Edited ]

Hello Everyone.

 

Currently I am testing some Apps On my BlackBerry 10 Dev Alpha.

 

My Question Is: Are  there some ways to Invoke NFC APIs in BlackBerry 10 Webworks(HTML5) Platform?

 

Such as Reading Tags or Writing Tags.

 

Higly Appreciated if anyone can help me.~~~ 

Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: [HELP]Is there a way to Invoke NFC APIS in BlackBerry 10 Webworks(Html5 Development) ?

Read and Write NFC APIs are missing so far in WebWorks, but with the help of an Native-to-WebWorks extension you are able to make it working. For WebWorks extensions in BB10 have a closer look at this thread I reported about an example already available on github and how to get it running right now with a small fix: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/BB10-WebWorks-Extensions/td-p/17...

 

Then there is the possibility to set up an app to be invoked when NFC tags are recognized by BB10 device. You could try the invokable example here: https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/invoke

You need to change the config.xml to be invoked on NFC tags by adding this:

 

<rim:invoke-target id="example.NFCInvokable.app">
	<type>APPLICATION</type>
	<filter>
		<action>bb.action.OPEN</action>
		<mime-type>application/vnd.rim.nfc.ndef.1.Sp</mime-type>
		<mime-type>application/vnd.rim.nfc.ndef.1.T</mime-type>
		<mime-type>application/vnd.rim.nfc.ndef.1.U</mime-type>
		<mime-type>application/vnd.rim.nfc.ndef.4</mime-type>
	</filter>
</rim:invoke-target>

 

To read and write NFC, for now, there is an example written in Cascades: https://github.com/blackberry/Cascades-Community-Samples/tree/master/NfcTool


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Contributor
Posts: 16
Registered: ‎08-14-2012
My Device: blackberry 10 dev alpha
My Carrier: China unicom

Re: [HELP]Is there a way to Invoke NFC APIS in BlackBerry 10 Webworks(Html5 Development) ?

Is there an example of Reading tags through  Webworks Extensions? Thank U


 

Highlighted
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: [HELP]Is there a way to Invoke NFC APIS in BlackBerry 10 Webworks(Html5 Development) ?

No. there isn't since there is not API to read and write NFC tags yet. Thats why I pointed out the invoker example. With the help of the invoker your app is opended when your device is reading NFC tags and is pointing ot it with the following data example:

 

action: "bb.action.OPEN"
background: "no"
data: "0QEaVAJlbkhlbGxvLCBJIGFtIGFuIE5GQyB0YWch"
target: "my.app"
type: "application/vnd.rim.nfc.ndef.1.T"

 So you get the "type" of the tag and the "data" written to it and can build something to read tags without waiting for the API or writing your own extension.

 


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.