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. ExpandableListView indicator over my text

I'm using an ExpandableListView in one of my activity in a

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="

and I'm using a custom expandableListAdaptaer which group view is :

public TextView getGenericView() {
                // Layout parameters for the ExpandableListView
                AbsListView.LayoutParams lp = new AbsListView.LayoutParams( //
                                ViewGroup.LayoutParams.FILL_PARENT, 64);

                TextView textView = new TextView(mainContext);
                // Center the text vertically
                textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);
                // Set the text starting position
                textView.setPadding(36, 0, 0, 0);
                return textView;

(Found on examples of API_Demos, ExpandableList1)

A user of my application report me this photo
As you can see, the indicator of group items is over the text of group
item despite the padding of 36...

And if I'm running emulator WVGA800 or an emulator with "abstracted
LCD density" to 240 I have the same problem, but with my phone (HTC
G1), I don't have any problem.

What is strange is that I try the application API_Demo with an
emulator WVGA800 or an emulator with "abstracted LCD density" to 240
and I go to ExpandableList1 activity and all is alright !

I also try to copy the inner class available in ExpandableList1 for
adapter and I launch it into my activity and I also have the problem
see on photo

What I am doing wrong... ? I am forced to manage density into my
adapters in order to adjust the padding ?


2. mohon bantuan, pusing soal DREAM

mohon bantuan lg pusing berat soalnya
ceritanya :
1minggu yg lalu beli HTC dream n mau gw root spy bisa ganti rom :D
tapi pusing, sblm gw apa2 in dreamnya update sendiri ke firmware 1.5
nah trus gw ikutin cara root dari

 dan dari sini

tapi tetep g pernah berhasil, lalu gw coba donlot firmware 1.6 dr
HTCnya gw update sukses tapi tetep g bisa ganti room yg laen??!?!?!

pertanyaannya :
1. ada yg bisa bantuin g cara root yg gampang dr firm 1.6???
2. ato ada theme yg keren n gimana cara installnya yg gampangya.

tq master2 smua. tolong dibantuin
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to

To request to subscribe to this group:


3. Is there an explorer for all contentProviders?

4. what is

5. internal compiler error: Segmentation fault (Eclair + 4.3.1 toolchain)

6. Accents in strings

7. Call Webservice From Android