NFC/NfcWriteNdefSmartTag/src/nfc/sample/Ndef/Write/NfcWriteNdefSmartTagListener.java
/*
     * This is where we get informed of a tag in the proximity of NFC antenna
     */
This is where we get informed of a tag in the proximity of NFC antenna
This is where we get informed of a tag in the proximity of NFC antenna
public void onTargetDetected(Target smartTagTarget) {
        Utilities.log("XXXX NfcWriteNdefSmartTagListener detected a tag");
        String target_uri = smartTagTarget.getUri(Target.NDEF_TAG);
        _tag_attrs = _screen.getTagAttributes();
        switch(_tag_type) {
        case Constants.TYPE_SP:
            writeSpTag(target_uri);
            break;
        case Constants.TYPE_CUSTOM:
            writeCustomTag(target_uri);
            break;
        case Constants.TYPE_TEXT:
            writeTextTag(target_uri);
            break;
        case Constants.TYPE_URI:
            writeUriTag(target_uri);
            break;
        default:
            Utilities.log("XXXX Unrecognised type requested:" + _tag_type);
        }
    }
public void onTargetDetected ( Target smartTagTarget ) { Utilities . log ( "XXXX NfcWriteNdefSmartTagListener detected a tag" ) ; String target_uri = smartTagTarget . getUri ( Target . NDEF_TAG ) ; _tag_attrs = _screen . getTagAttributes ( ) ; switch ( _tag_type ) { case Constants . TYPE_SP : writeSpTag ( target_uri ) ; break ; case Constants . TYPE_CUSTOM : writeCustomTag ( target_uri ) ; break ; case Constants . TYPE_TEXT : writeTextTag ( target_uri ) ; break ; case Constants . TYPE_URI : writeUriTag ( target_uri ) ; break ; default : Utilities . log ( "XXXX Unrecognised type requested:" + _tag_type ) ; } }
This is where we get informed of a tag in the proximity of NFC antenna
This is where we get informed of a tag in the proximity of NFC antenna