Forum › MIFARE SDK › Mifare SDK Lite filterIntent › Reply To: Mifare SDK Lite filterIntent
Hi David,
I tried a couple of times with various different code versions, and I added the following to my onNewIntent method before using the NXP library calls:
Tag tagFromIntent = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
Log.e(TAG,"TagFromIntent:"+ tagFromIntent.toString());
String curTechlist[] = tagFromIntent.getTechList();
boolean isClassicSupported=false;
for(int i=0;i<curTechlist.length;i++){
if(curTechlist.contains("Classic")){
isClassicSupported=true;
break;
}
}
if(isClassicSupported) {
classsic2 = MifareClassic.get(tagFromIntent);
Log.e(TAG, Integer.toString(classsic2.getType()));
int MFSize = classsic2.getSize();
}
else
{
Log.e(TAG,"NO Classic card //\n Classic card not supported by this device");
}
When I checked the Log Cat, I found the below issue: on the phone the get tech list returns not a Mifare device but the following:
android.nfc.tech.NfcA
07-21 10:29:19.333 9072-9072/com.nxp.sampleliblite E/NFC_TAG﹕ TagFromIntent:TAG: Tech [android.nfc.tech.NfcA ]
07-21 10:29:43.667 9072-9072/com.nxp.sampleliblite E/NFC_TAG﹕ NO Classic card //
Classic card not supported by this device
I tried a couple of times with various different code versions, and I added the following to my onNewIntent method before using the NXP library calls:
Tag tagFromIntent = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
Log.e(TAG,"TagFromIntent:"+ tagFromIntent.toString());
String curTechlist[] = tagFromIntent.getTechList();
boolean isClassicSupported=false;
for(int i=0;i<curTechlist.length;i++){
if(curTechlist.contains("Classic")){
isClassicSupported=true;
break;
}
}
if(isClassicSupported) {
classsic2 = MifareClassic.get(tagFromIntent);
Log.e(TAG, Integer.toString(classsic2.getType()));
int MFSize = classsic2.getSize();
}
else
{
Log.e(TAG,"NO Classic card //\n Classic card not supported by this device");
}
When I checked the Log Cat, I found the below issue: on the phone the get tech list returns not a Mifare device but the following:
android.nfc.tech.NfcA
07-21 10:29:19.333 9072-9072/com.nxp.sampleliblite E/NFC_TAG﹕ TagFromIntent:TAG: Tech [android.nfc.tech.NfcA ]
07-21 10:29:43.667 9072-9072/com.nxp.sampleliblite E/NFC_TAG﹕ NO Classic card //
Classic card not supported by this device
+ 0
|
- 0