mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-11 08:48:06 +01:00
don't force NFC messages to ascii -- it breaks special chars and isn't
required, even with special chars.
This commit is contained in:
parent
e9bdf3c4f8
commit
4d6a37b048
1 changed files with 3 additions and 5 deletions
|
@ -29,7 +29,6 @@ import android.nfc.NfcAdapter;
|
||||||
import android.nfc.NfcEvent;
|
import android.nfc.NfcEvent;
|
||||||
import android.nfc.NfcManager;
|
import android.nfc.NfcManager;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import java.nio.charset.Charset;
|
|
||||||
|
|
||||||
public class NFCUtils {
|
public class NFCUtils {
|
||||||
private static boolean s_inSDK =
|
private static boolean s_inSDK =
|
||||||
|
@ -95,10 +94,9 @@ public class NFCUtils {
|
||||||
{
|
{
|
||||||
String mimeType = activity.getString( R.string.xwords_nfc_mime );
|
String mimeType = activity.getString( R.string.xwords_nfc_mime );
|
||||||
NdefMessage msg = new NdefMessage( new NdefRecord[] {
|
NdefMessage msg = new NdefMessage( new NdefRecord[] {
|
||||||
new NdefRecord(NdefRecord.TNF_MIME_MEDIA, mimeType
|
new NdefRecord(NdefRecord.TNF_MIME_MEDIA,
|
||||||
.getBytes(Charset.forName("US-ASCII")),
|
mimeType.getBytes(), new byte[0],
|
||||||
new byte[0],
|
data.getBytes())
|
||||||
data.getBytes(Charset.forName("US-ASCII")))
|
|
||||||
,NdefRecord.
|
,NdefRecord.
|
||||||
createApplicationRecord( activity.getPackageName() )
|
createApplicationRecord( activity.getPackageName() )
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue