I am adding NFC card emulation in my android application. I need to customize my application behavior with respect to the mobile phone’s NFC support. i.e, if the Android device doesn’t have NFC support then the card emulation is not active and vice verse. So that I can upload a single application to the Android market that runs independent to the NFC feature.
Let me know how I can achieve the above functionality (Dynamic class loading)? Please provide me with some sample code?
I would like to build my application targeting to minimum API level 8 (OS 2.2)
Regards
@nish
Step #1: Add
<uses-feature android:name="android.hardware.nfc" android:required="false" />to your manifest.Step #2: Where needed, use
PackageManagerandhasSystemFeature()to determine if the device has theandroid.hardware.nfcfeature.