
Originally Posted by
petteriko1
What I want to do is:
When MIDlet is running and tag is read, get the UID of the tag => This part is OK, no problem there
When MIDlet is not running and tag is read, launch the MIDlet and get the UID of that tag.
I succeed to auto-launch the MIDlet with Push entry in jad file (MIDlet-Push-1: nfc:undefined_format,Panther,*), but not getting UID of that tag (the one that launches the MIDlet). I have implemented “RecordListerner” with:
dm = DiscoveryManager.getInstance();
startType = dm.getProperty("LaunchType");
try {
dm.addTargetListener(this, TargetType.RFID_TAG);
//dm.addNDEFRecordListener(this, new NDEFRecordType(NDEFRecordType.NFC_FORUM_RTD, "urn:nfc:wkt:RFID_TAG"));
//dm.addNDEFRecordListener(this, new NDEFRecordType(NDEFRecordType.URI,"nfc:rf;type=simpletag;uid=*"));
dm.addNDEFRecordListener(this, new NDEFRecordType(NDEFRecordType.URI,"nfc:ndef;type=simpletag;uid=*"));
and then public void recordDetected(NDEFMessage ndefMessage) but non of them never seems to go to recordDetected.
I’m using only Mifare Ultralight (MF0U1) tags