hwsecurity / de.cotech.hw.util / NfcStatusObserver / isNfcEnabled /
isNfcEnabled
open fun isNfcEnabled(): Boolean
Returns true if NFC hardware is available and enabled.
This method will always return false if no NFC hardware is available on the device. You can use isNfcHardwareAvailable to check if NFC hardware is available.
open fun isNfcEnabled(context: Context): Boolean
Returns true if NFC hardware is available and enabled.
This is a static variant of isNfcEnabled, it can be used to check if NFC is enabled without creatingan instance of NfcStatusObserver. However, in activities that expect NFC interactions, it is generally preferableto handle this dynamically, in case NFC is dynamically enabled or disabled.