NdefRecord.CreateApplicationRecord(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Create a new Android Application Record (AAR).
[Android.Runtime.Register("createApplicationRecord", "(Ljava/lang/String;)Landroid/nfc/NdefRecord;", "")]
public static Android.Nfc.NdefRecord? CreateApplicationRecord (string? packageName);
[<Android.Runtime.Register("createApplicationRecord", "(Ljava/lang/String;)Landroid/nfc/NdefRecord;", "")>]
static member CreateApplicationRecord : string -> Android.Nfc.NdefRecord
Parameters
- packageName
- String
Android package name
Returns
Android application NDEF record
- Attributes
Remarks
Create a new Android Application Record (AAR).
This record indicates to other Android devices the package that should be used to handle the entire NDEF message. You can embed this record anywhere into your message to ensure that the intended package receives the message.
When an Android device dispatches an NdefMessage
containing one or more Android application records, the applications contained in those records will be the preferred target for the NfcAdapter#ACTION_NDEF_DISCOVERED
intent, in the order in which they appear in the message. This dispatch behavior was first added to Android in Ice Cream Sandwich.
If none of the applications have a are installed on the device, a Market link will be opened to the first application.
Note that Android application records do not overrule applications that have called NfcAdapter#enableForegroundDispatch
.
Java documentation for android.nfc.NdefRecord.createApplicationRecord(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.