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. How to handle portrait modes only for big Screens ?

Hi all,

In my game, I have the main game activity that is for the moment in
portrait only.
So in the manifest, I force it with this lines :
And that's good.

But with tablets and big screens, I want to have a landscape mode
( and only for big screens, there is no room enough for small
screens )

So I have to set the orientation by code, this is the easy part :

But I also have to have the equivalent of the
android:configChanges="keyboardHidden|orientation" manifest line in
And I have no clue on how to do it !

And if I don't do it in the manifest, the activity will still be
destroyed and recreated when I'm in the little screen configuration
If I do it in the manifest, I don't have the destruction / recreation
phase for big screens...

So how to handle that ?

Any help appreciated,

Emmanuel / Alocaly


2. AVI Player untuk X8 Apa ya?

Dear All,

Mau tanya Avi player untuk X8 Apa ya. Aku udah nyoba meridian player tetep
gak bisa

Thank you

Bayu Seno Adji
Website :
Blog :
Web Hosting Murah :


3. Keeping the OAuth consumer secret safe, and how to react when it's compromised ?

4. How to intercept running application?

5. Boss AH di UIN

6. What happened to the Arrows and + and - button in Layout Editor

7. Download Youtube