masonamerica.platform.NfcAdapterPrivileged |
A privileged extension of the existing ERROR(/android.nfc.NfcAdapter)
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Disable NFC hardware.
| |||||||||||
Enable NFC hardware.
|
Disable NFC hardware.
No NFC features will work after this call, and the hardware will not perform or respond to any NFC communication.
This call is asynchronous. Listen for
ERROR(/android.nfc.NfcAdapter#ACTION_ADAPTER_STATE_CHANGED)
broadcasts to find out when the
operation is complete.
If this returns true, then either NFC is already off, or
a ERROR(/android.nfc.NfcAdapter#ACTION_ADAPTER_STATE_CHANGED)
broadcast will be sent
to indicate a state transition. If this returns false, then
there is some problem that prevents an attempt to turn
NFC off.
Returns | |
---|---|
boolean |
Enable NFC hardware.
This call is asynchronous. Listen for
ERROR(/android.nfc.NfcAdapter#ACTION_ADAPTER_STATE_CHANGED)
broadcasts to find out when the
operation is complete.
If this returns true, then either NFC is already on, or
a ERROR(/android.nfc.NfcAdapter#ACTION_ADAPTER_STATE_CHANGED)
broadcast will be sent
to indicate a state transition. If this returns false, then
there is some problem that prevents an attempt to turn
NFC on (for example we are in airplane mode and NFC is not
toggleable in airplane mode on this platform).
Returns | |
---|---|
boolean |