I've built an app that reads out certain data from the student ID cards our school uses. Right now it only reads user data but in the future the plan is to add support to read the remaining credit.
The problem is that the cards we use are Mifare Classic. Nexus 4 and Nexus 10 (and possibly more devices) don't support these cards since they have a Broadcom NFC controller. If I'm right the app shouldn't crash or give issues on those devices, but it just doesn't do anything.
Is there a way to somehow exclude these devices without NXP controller? (Basically like uses-feature required for the MifareClassic class.) I can exclude the Nexus 4 and 10 through the Play Store but that's hardly a good solution - even more because other devices might start using Broadcom controllers and they'd all have to be excluded manually.
Thanks! - Ambroos
You can check in your app for MIFARE Classic support as follows:
boolean hasMifare(Context ctx) {
return ctx.getPackageManager().hasSystemFeature("com.nxp.mifare");
}
There is no way to check for this before installing the app. But after installation, you can warn the user that the functionality of your app will be limited, because of the lack of MIFARE Classic support.