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

Reply
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

NFC for BB10?

We have a superb app one of my mates is gonna pitch in Berlin on 28th

 

What we need is NFC for BB10

 

I've ordered a NFC dev kit (lots of tags)

 

Rod - hope you're reading this - you know this stuff backwards (Rod won the BBJam pitch in London for his passionate late entry) Hell, we pitched as well - I had to vote for us but wanted to vote for Rod (my boss admitted the same - <g>)

 

I should habe the NFC kit middle of the week and need to deliver for the Berlin Jam

 

I've got a DevAlpha to test on

 




Click the like button if you find my posts useful!
Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: NFC for BB10?

[ Edited ]

There a couple of "NFC for Blackberry 10" articles available. I believe/hope these will help.

 

http://supportforums.blackberry.com/t5/Java-Development/NFC-Article-and-Code-Index/ta-p/1538775

 

--------------------------------------------------------------------------------------------
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!
Follow me on Twitter: @mdwrim
Please use plain text.
BlackBerry Development Advisor
jomurray
Posts: 121
Registered: ‎09-06-2010
My Device: Z30
My Carrier: Vodafone UK

Re: NFC for BB10?

http://blackberry.github.com/Community/NFC.html

---------------------------------------
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
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: NFC for BB10?

[ Edited ]

Got it - playing with my tags - ta




Click the like button if you find my posts useful!
Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: NFC for BB10?

Enjoy :-)

--------------------------------------------------------------------------------------------
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!
Follow me on Twitter: @mdwrim
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: NFC for BB10?

It's all working - time for some rapid education my end (spec reading)

 

Dumb Q you're bound to know the answer to (less reasearch for me)

 

Do NFC tags have a unique identifier of do I have to write one to them to uniquely identify a tag?




Click the like button if you find my posts useful!
Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: NFC for BB10?

They have a UID and this will have been programmed by the manufacturer.

--------------------------------------------------------------------------------------------
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!
Follow me on Twitter: @mdwrim
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: NFC for BB10?

Now when we have the possibility to create BB10 WebWorks Extensions based on native code, would it be possible to create a handler/extension for NFC or is a NFC API for WebWorks on the list of upcoming APIs?


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: NFC for BB10?

It will be possible to create an extention, yes. Hopefully we'll see standard APIs for WebWorks developers to use as well though I'm not sure whether this is on the road map or not. 

 

You might want to look at doing this with Cascades instead.

--------------------------------------------------------------------------------------------
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!
Follow me on Twitter: @mdwrim
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: NFC for BB10?

It seems reading NFC using WebWorks isn't a problem if you set up your app to be invokable for NFC tags using rim:invoke-target like the following in your config.xml:

 

<rim:invoke-target id="com.me.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>
	</filter>
</rim:invoke-target>

You will get the NFC tag data in the object.data attribute and using atob(object.data) but it also contains some payload data like "ÑTen" or "ÑU" I got in the console before the real information I wrote to the NFC tag.

 


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.