NFC/NfcReadNdefSmartTag/src/nfc/sample/Ndef/Read/NfcReadNdefSmartTagUpdate.java
/*
     * (non-Javadoc)
     * 
     * @see java.lang.Runnable#run()
     * 
     * This is the runnable unit of work that was scheduled from the NDEF Message handler
     */




This is the runnable unit of work that was scheduled from the NDEF Message handler
This is the runnable unit of work that was scheduled from the NDEF Message handler
public void run() {
        NDEFRecord[] records = _message.getRecords();
        try {
            Utilities.log("XXXX using helper classes to parse NDEF message");
            SmartPosterRecord sp = new SmartPosterRecord(records[0]);
            String uri = sp.getUri();
            String id = sp.getId();
            String mime = sp.getMimeType();
            int size = sp.getSize();
            String type = sp.getType();
            byte [] payload = sp.getPayload();
            _screen.logEvent("type="+type);
            _screen.logEvent("URI="+uri);
            _screen.logEvent("Payload size="+payload.length);
        } catch(NFCException e) {
            Utilities.log("XXXX NFCException using helper classes to parse NDEF message:"+e.getMessage());
        }
    }
public void run ( ) { NDEFRecord [ ] records = _message . getRecords ( ) ; try { Utilities . log ( "XXXX using helper classes to parse NDEF message" ) ; SmartPosterRecord sp = new SmartPosterRecord ( records [ 0 ] ) ; String uri = sp . getUri ( ) ; String id = sp . getId ( ) ; String mime = sp . getMimeType ( ) ; int size = sp . getSize ( ) ; String type = sp . getType ( ) ; byte [ ] payload = sp . getPayload ( ) ; _screen . logEvent ( "type=" + type ) ; _screen . logEvent ( "URI=" + uri ) ; _screen . logEvent ( "Payload size=" + payload . length ) ; } catch ( NFCException e ) { Utilities . log ( "XXXX NFCException using helper classes to parse NDEF message:" + e . getMessage ( ) ) ; } }
(non-Javadoc)
( non - Javadoc )
//            _screen.logEvent("id="+id); //            _screen.logEvent("MIME="+mime); //            _screen.logEvent("size="+size);