diff options
Diffstat (limited to 'src/com')
-rwxr-xr-x | src/com/android/nfc/NativeNfcTag.java | 13 | ||||
-rwxr-xr-x | src/com/android/nfc/NfcService.java | 9 |
2 files changed, 19 insertions, 3 deletions
diff --git a/src/com/android/nfc/NativeNfcTag.java b/src/com/android/nfc/NativeNfcTag.java index ac6d7a9..43ef644 100755 --- a/src/com/android/nfc/NativeNfcTag.java +++ b/src/com/android/nfc/NativeNfcTag.java @@ -26,6 +26,10 @@ public class NativeNfcTag { private String mType; + private byte[] mPollBytes; + + private byte[] mActivationBytes; + private byte[] mUid; private final String TAG = "NativeNfcTag"; @@ -137,4 +141,13 @@ public class NativeNfcTag { public byte[] getUid() { return mUid; } + + public byte[] getPollBytes() { + return mPollBytes; + } + + public byte[] getActivationBytes() { + return mActivationBytes; + } + } diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java index 2c1b262..1f17c36 100755 --- a/src/com/android/nfc/NfcService.java +++ b/src/com/android/nfc/NfcService.java @@ -2063,7 +2063,8 @@ public class NfcService extends Application { msgNdef[0] = new NdefMessage(buff); NdefTag tag = new NdefTag(nativeTag.getUid(), TagTarget.internalTypeToRawTargets(nativeTag.getType()), - null, null, nativeTag.getHandle(), + nativeTag.getPollBytes(), nativeTag.getActivationBytes(), + nativeTag.getHandle(), TagTarget.internalTypeToNdefTargets(nativeTag.getType()), new NdefMessage[][] {msgNdef}); Intent intent = buildNdefTagIntent(tag); @@ -2088,7 +2089,8 @@ public class NfcService extends Application { // Create an intent with an empty ndef message array NdefTag tag = new NdefTag(nativeTag.getUid(), TagTarget.internalTypeToRawTargets(nativeTag.getType()), - null, null, nativeTag.getHandle(), + nativeTag.getPollBytes(), nativeTag.getActivationBytes(), + nativeTag.getHandle(), TagTarget.internalTypeToNdefTargets(nativeTag.getType()), new NdefMessage[][] { {} }); Intent intent = buildNdefTagIntent(tag); @@ -2105,7 +2107,8 @@ public class NfcService extends Application { Intent intent = new Intent(); Tag tag = new Tag(nativeTag.getUid(), false, TagTarget.internalTypeToRawTargets(nativeTag.getType()), - null, null, nativeTag.getHandle()); + nativeTag.getPollBytes(), nativeTag.getActivationBytes(), + nativeTag.getHandle()); intent.setAction(NfcAdapter.ACTION_TAG_DISCOVERED); intent.putExtra(NfcAdapter.EXTRA_TAG, tag); intent.putExtra(NfcAdapter.EXTRA_ID, tag.getId()); |