Code example for NfcAdapter

Methods: disableForegroundDispatch

0
    } 
 
    @Override 
    protected void onPause() { 
        super.onPause(); 
        mNfcAdapter.disableForegroundDispatch(this);
    } 
 
    @Override 
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
 
        NdefMessage[] messages = getNdefMessages(intent);
        boolean isMatch = messages != null
                && messages.length > 0
                && NfcUtils.areMessagesEqual(messages[0], NdefPushSenderActivity.TEST_MESSAGE);
 
        getPassButton().setEnabled(isMatch);
 
        Bundle args = new Bundle();
        args.putBoolean(IS_MATCH_ARG, isMatch);