NFC Mock Tags and Successfully Writing NFC Tags

by muasif80 » Mon, 31 Jan 2011 18:07:13 GMT

Sponsored Links
 I would like to ask one thing about NFC demo available in gingerbread.
There are three mocked nfc tags available in this demo. Now can anyone
tell me how can I create one more mocked tag.

For example we have

     * A Smart Poster containing a URL and no text.
    public static final byte[] SMART_POSTER_URL_NO_TEXT =
        new byte[] {(byte) 0xd1, (byte) 0x02, (byte) 0x0f, (byte)
0x53, (byte) 0x70, (byte) 0xd1,
            (byte) 0x01, (byte) 0x0b, (byte) 0x55, (byte) 0x01, (byte)
0x67, (byte) 0x6f,
            (byte) 0x6f, (byte) 0x67, (byte) 0x6c, (byte) 0x65, (byte)
0x2e, (byte) 0x63,
            (byte) 0x6f, (byte) 0x6d};


Now this data is actually the 
Now I want to have in my 
SMART_POSTER_URL_NO_TEXT data member. How can I get the bytes for it
any idea.

Also I have seen that the people at Gibraltar Software Factory have
successfully used the NFC feature of gingerbread to write NFC tags.
Here is the url but they did not 
provide complete code, if someone can see there demo and build
complete code for that demo and share then it will be pleasure for me.



Re: NFC Mock Tags and Successfully Writing NFC Tags

by Jie Sheng Chua » Fri, 20 May 2011 09:34:02 GMT

 Hi Asif,

SMART_POSTER_URL_NO_TEXT is equivalent to a NdefRecord.TNF_WELL_KNOWN and
NdefRecord.RTD_URI record.
i create a generic method to create these record.
after you retrieve the NdefRecord, you could get the bytes via
the code is here, 

i have other related code here, 
the full project code is also available here, ~jiesheng/dl/android/

Jie Sheng

Jie Sheng, Chua
(+65) 97520245

The contents of this email are confidential to the intended recipient and
may not be disclosed. Although it is believed that this email and any
attachments are virus free, it is the responsibility of the recipient to
confirm this.


Sponsored Links

Other Threads

1. Successful to install ADT in Eclipse, but Windows > Preferences doesn't show "Android" on the left panel

    I have been trying to install ADT in Eclipse Java EE, Java and
Classic. All successful to install but the "Android" will not show up
in Windows > Preferences of Eclipse. I have the Android SDK installed
and JDK 6 installed. Can anyone help to tell me what I did wrongly?
    I follow step by step of the instruction here but it never work.


2. SERIOUS problem w/ uninstalled apps and update notifications

I think it's less that they'd get too many messages and more of the simple
fact that they don't HAVE TO provide any form of support. A cable or phone
company relies on your subscription to make money. If they don't support
their product, you would get pissed and move on to another company that did,
and they would go out of business.

Google on the other hand gives everything away for free anyway and won't be
adversely affected by unhappy customers - the number of people happily using
Google search, Gmail, Calendar, etc far outweigh those of us unhappy with
the state of Android - so there's no pressing need to provide any support
for anything.

Of course, we did all pay $25 to register as developers, so you'd think that
would warrant some level of support for the "good" we purchased. But what do
I know?


TreKing - Chicago transit tracking app for Android-powered devices


3. Users marking down free apps because missing paid app features

4. How to determine what apps are using data on my phone?

5. alt key

6. WiFi Proxy

7. Different Notification for Text Message and Email