Android NFC - Add parameter to AAR

456 Views Asked by At

I'm new to the NFC / NDEF stuff in Android. I want to build the following app:

I need one app to write a NFC tag with information about another app (package-name). This other app should be opened automatically on scanning this tag (after writing). I read something about AAR - it also seems to work, as long as I don't have the following special idea:

I also want to "save" additional information on the tag, so that a mobile device which scans the tag, opens the app AND reads out that "parameter" data (used to influence the behavior of the app after opening it). Can anybody help me? The article about the NFC basics (http://developer.android.com/guide/topics/connectivity/nfc/nfc.html) confused me...

1

There are 1 best solutions below

2
On BEST ANSWER

You can have other records - containg your additional data - in the same NDEF message as the AAR. The AAR helps in the situation where the user does not have the specific app installed by sending him to that app in the app store. Once the app is installed, the AAR is ignored and the other records in the NDEF message work as designed.

However the installation of the app via the AAR ist not fully automatic. The ARR juste guides the user to the right location in the app store. The user still needs to install the app like any other app.