Code example for NfcAdapter

Methods: enableForegroundDispatch

0
 
    private void enableTagWriteMode(IntentFilter[] writeTagFilters,
            PendingIntent pendingIntent)
    { 
        Log.d(TAG, "enable write mode");
        mNfcAdapter.enableForegroundDispatch(context, pendingIntent,
                writeTagFilters, null);
    } 
 
    private void disableTagWriteMode() 
    { 
        Log.d(TAG, "disable write mode");
        if (mNfcAdapter != null)
        { 
            mNfcAdapter.disableForegroundDispatch(context);
        } 
    } 
 
} 
Experience pair programming with AI  Get Codota for Java