Since 2.3.3 you can also use NfcAdapter.getDefaultAdapter() to get the adapter (if available) and call its isEnabled() method to check whether NFC is currently turned on.
/Adam On 6 Sep, 14:34, Mark Murphy <[email protected]> wrote: > On Tue, Sep 6, 2011 at 8:29 AM, Adiga <[email protected]> wrote: > > How to detect programatically the android device is nfc enabled > > or not? If any one knows help me. > > Use PackageManager and hasSystemFeature("android.hardware.nfc"), > matching the <uses-feature android:name="android.hardware.nfc" > android:required="false" /> element you should have in your manifest. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android 3.1 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

