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.
08-14-2012 01:24 AM - edited 08-14-2012 01:34 AM
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.~~~
08-14-2012 02:06 AM
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-Web
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-Sample
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-ty pe> </filter> </rim:invoke-target>
To read and write NFC, for now, there is an example written in Cascades: https://github.com/blackberry/Cascades-Community-S
08-15-2012 12:40 AM
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.