Authentication scheme for an Android application: When the SIM card is locked or exhanged by another, the app stops working
If you lock your app with SIM properties and requires those properties to be presented for unlocking the app, have you thought about where to store those properties in the app (hard coded, database, file, Preferences,...)? Or are you thinking to contact the server for verification? Both way, you may end up in a complex solution with possible security flaws. SIM serial number is something unique but at the same time it is public, you can't rely on this property to lock your app.
TelephonyManager class is the gateway for accessing SIM properties( this class also exposes users privacy in a number of ways). As of now, there is no android crypro API exposed to perform cryptographic operations in the SIM. But, since your customer can contact the operator, you may consider to ask the operator to sign your app. In that case, you may have a way to use their SIM card as a secure element. There is a discussion on this thread. PIN code based with a limited number of attempts is another way to implement a simple authentication for accessing your app. You may implement this at the application layer without involving the SIM card.
Hope this helps.
How to store android application data on sim card using NFC?
tl;dr - it is not currently possible without enormous effort.
You want to use the SIM card as the Secure Element in Card Emulation mode - this is the approach favoured by GSM Association. To access the Secure Element (on SIM or Integrated Chip), you need to use a Trusted Service Manager (TSM). In your case, the TSM would send data to your SIM card using binary SMS messages. The problem is that it is very early days for NFC on mobile phones. Tag reading/writing is simple enough but accessing the Secure Element is not. There are very limited trials of NFC SmartPhones using SIM as secure element for Card Emulation, and the trials are all currently limited to a specific Mobile Network Operator (MNO) in specific countries.
If you do want to do this, you need to read the specifications, write a TSM and then get the necessary contracts with the MNOs to be allowed to use their SIMs.
Good luck!
Related Topics
Hide Tablayout on Scroll of Content Instead of Toolbar
How to Change Color of Vector Drawable Path on Button Click
Not Seeing Nexus7 in Eclipse's Android Devices
Android: Runonuithread Vs Asynctask
List View Item Swipe Left and Swipe Right
Error: Error Parsing Xml: Not Well-Formed (Invalid Token) ...
How to Deal with Deprecated Classes in Android to Keep Compatibility
Supporting Amazon and Android Market (Google Play) Links Inside Application
How to Set Proxysettings and Proxyproperties on Android Wi-Fi Connection Using Java
Camera Preview Is in Portrait Mode But Image Captured Is Rotated
Android Adding a Submenu to a Menuitem, Where Is Addsubmenu()
Eclipse: Won't Let Me Use Android Sdk, Wrongly Claims My Adt Is Out of Date
Conversion from String to JSON Object Android
How to Get The Dimensions of a Drawable in an Imageview
Detecting The Scrolling Direction in The Adapter (Up/Down)
How to Embed Vlc Media Player to My Android App