8
votes

I am looking for some advice regarding NFC data.

I have a device, lets say a printer or speaker. I want to put a NFC tag on this device. The data I want to put in NFC tag is DeviceName/MacAddress/Password.

Now the requirement is when ever user touches my tag with Android or Windows phone

  1. My app should be launched.
  2. If my app is not already installed it should take me to Play Store or Windows store
  3. I shoul be able to get data from NFC tag in my application (DeviceName/MacAddress/Password)

As of now I could get it done in Android using 2 NDEF records

  1. Custom MIME type record with my data (application/vnd.pakage.name )
  2. Android Application record.

The issue is how can I launch app in Windows Phone? As I understand with custom Mime application/vnd.pakage.name Windows application could not be launched. Pls. let me know if I am wrong.

Windows LaunchApp record should be the first record and if I make that as first record then in Android I don't get my data.

The Only soluction which looks probable is the NDEF records in following formats.

  1. Custom URI with my data (myscheme://my.package.com?DeviceName/MacAddress/Password)
  2. Android application record.

But using this format also I am not able to get data in Android. Pls. let me know if there is any better solution? How I can get data in Android?

Thanks

1

1 Answers

0
votes

Your last proposal for a solution should work. Make sure your intent filter declares at least the scheme and the hostname. This article may be of interest, too: How to Create Cross-Platform LaunchApp NFC Tags.