Parsing is part of the NFCDemo app.
http://developer.android.com/resources/samples/NFCDemo

Sending a URL would probably be just doing it the other way around
using NDEF Push. Haven't tried it yet, but I believe something like
this should work:

In onCreate()...

  mAdapter = NfcAdapter.getDefaultAdapter(this);

  String url = "http://example.com";;
  byte[] payload = url.getBytes();
  NdefRecord ndefRecord = new NdefRecord(NdefRecord.TNF_ABSOLUTE_URI,
NdefRecord.RTD_URI, new byte[0], payload);
  mNdefPushMessage = new NdefMessage(new NdefRecord[]
{ ndefRecord });

...and in onResume():

  mAdapter.enableForegroundNdefPush(this, mNdefPushMessage);

/Adam

On 18 Maj, 12:46, "[email protected]" <[email protected]> wrote:
> Hi I would like to know how I can send a url for a nexus S nfc to
> another, How can I parse the url from the mobile that receives it.
>  Thank you very much

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to