Code example for NfcAdapter

Methods: disableForegroundDispatch, isEnabled

0
        if (bluetoothDevice != null) {
            bluetoothDevice.removeListener(this);
        } 
 
        if (isFinishing()) {
            if (nfcAdapter != null && nfcAdapter.isEnabled())
                nfcAdapter.disableForegroundDispatch(this);
            inReadMode = false;
        } 
        super.onPause(); 
    } 
 
    public void okPushed( View view ) {
        Intent intent = getIntent();
        intent.putExtra(LibraryConstants.PREFS_KEY_TEXT, lastReadNfcMessage);
        setResult(Activity.RESULT_OK, intent);
        finish();
    } 
 
    public void cancelPushed( View view ) {
        finish();