Create a new NDEF Record containing external (application-specific) data.
Use this method to encode application specific data into an NDEF Record.
The data is typed by a domain name (usually your Android package name) and
a domain-specific type. This data is packaged into a "NFC Forum External
Type" NDEF Record.
NFC Forum requires that the domain and type used in an external record
are treated as case insensitive, however Android intent filtering is
always case sensitive. So this method will force the domain and type to
lower-case before creating the NDEF Record.
The unchecked exception
IllegalArgumentException will be thrown
if the domain and type have serious problems, for example if either field
is empty, so always catch this
exception if you are passing user-generated data into this method.
There are no such restrictions on the payload data.
For efficiency, This method might not make an internal copy of the
data byte array, so take care not
to modify the data byte array while still using the returned
NdefRecord.
Reference specification: NFCForum-TS-RTD_1.0