Compartir a través de


NdefRecord.CreateTextRecord(String, String) Method

Definition

Create a new NDEF record containing UTF-8 text data.

[Android.Runtime.Register("createTextRecord", "(Ljava/lang/String;Ljava/lang/String;)Landroid/nfc/NdefRecord;", "")]
public static Android.Nfc.NdefRecord? CreateTextRecord (string? languageCode, string? text);
[<Android.Runtime.Register("createTextRecord", "(Ljava/lang/String;Ljava/lang/String;)Landroid/nfc/NdefRecord;", "")>]
static member CreateTextRecord : string * string -> Android.Nfc.NdefRecord

Parameters

languageCode
String

The languageCode for the record. If locale is empty or null, the language code of the current default locale will be used.

text
String

The text to be encoded in the record. Will be represented in UTF-8 format.

Returns

Attributes

Exceptions

if text is null

Remarks

Create a new NDEF record containing UTF-8 text data.

The caller can either specify the language code for the provided text, or otherwise the language code corresponding to the current default locale will be used.

Reference specification: NFCForum-TS-RTD_Text_1.0

Java documentation for android.nfc.NdefRecord.createTextRecord(java.lang.String, 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.

Applies to