pradhan venugopal pradhan venugopal - 1 year ago 97
Android Question

How to check if NFC is enabled or not in android devices 6.0

For android 6.0 devices how to check if NFC is enabled or not.
Can anyone guide me with an example.
Thanks in advance.

Answer Source

This may work try this

NfcManager manager = (NfcManager)context.getSystemService(Context.NFC_SERVICE);
NfcAdapter adapter = manager.getDefaultAdapter();
if (adapter != null && adapter.isEnabled()) {
    // adapter exists and is enabled.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download