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
Regular Contributor
senimii
Posts: 50
Registered: ‎04-27-2012
My Device: BlackBerry Q10

Read a tag and invoke a web-browser

I figured out that this might be useful for certain developers out there...that intends invoking their apps, by simply reading the NFC tag....and voila!!! Magic....awesome one from the BlackBerry 10....finding it so easy to develop my NFC enabled apps nowadays!!! Thank you to the people inside this forum too for your contribution!!! 

 

 

<invoke-target id="com.example.bb10app.nfc ">

        <require-source-permissions>invoke_across_perimeters</require-source-permissions>

        <invoke-target-type>application</invoke-target-type>

        <filter>

            <!-- The action(s) we support-->

            <action>bb.action.OPEN</action>

 

            <!-- The mime type(s) we support, application/vnd.rim.nfc.ndef is for all

                 NDEF types (i.e. text, media, smart poster, uri-->

            <mime-type>application/vnd.rim.nfc.ndef</mime-type>

 

            <!-- ndef:// means that we want to register for ALL NDEF messages,

               in most cases we want to be more specific; we can filter these

               messages further with the following format ndef://TNF/RECORD_TYPE

               (e.g. ndef://1/Sp for tnf: Well Known, record type: smart posters).

               for URI record types the record type needs to be URL encoded

               (e.g. ndef://3/http%3A%2F%2F for tnf: Uri, record type: http://).

               for external record types the colon (:smileyhappy: needs to be replaced with a

               forward slash (/)

               (e.g. ndef://4/rim.com/bbm for tnf: External, record type: rim.com:bbm).

 

               TNF VALUES:

               0 : Empty Tag

               1 : Well Known

               2 : Media (MIME)

               3 : Uri

               4 : External -->

            <property var="uris" value="ndef://"/>

        </filter>

        invoke_across_perimeters        application                                bb.action.OPEN   ...

 

 

*****NOTE: Note the TNF Value, 0,1,2,3,4

 

NFC on my mind!!
Regular Contributor
senimii
Posts: 50
Registered: ‎04-27-2012
My Device: BlackBerry Q10

Re: Read a tag and invoke a web-browser

This is usually added at the bottom of the bar-descriptor.xml....before the </qnx>

NFC on my mind!!