I wonder if it's possible to access to the SIM card with an Android Application
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
You can get the IMEI like this (but is it what you want ?), just an exemple :
Likewise, you have
Returns the ISO country code equivalent for the SIM provider's country code.
String getSimOperator():
Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM.String getSimOperatorName():
Returns the Service Provider Name (SPN).String getSimSerialNumber():
Returns the serial number of the SIM, if applicable.int getSimState():
Returns a constant indicating the state of the device SIM card.String getSubscriberId():
Returns the unique subscriber ID, for example, the IMSI for a GSM phone.For more, take a look at this page
and don't forget to add the correct permission in the manifest (
getDeviceId() => Requires Permission: READ_PHONE_STATE
)SEEK is most useful one,but majority Android phones are not support that.So,maybe we can assess SIM card by some other method like read SMS(in SIM card).
You should use IccFileHandler in interal api of android using java reflection . It is located at framework/base/telephony
SIM card access is only possible for system applications:
source: https://source.android.com/security/overview/app-security.html#sim-card-access
Without SmartCardAPI from SEEK(Secure Element Evaluation Kit) its never possible. In majority Android phones available in market SmartCardAPI is not implemented. So either you build your own Android after integrating the SmartCardAPI code or wait for some decent phone with this feature to come out. You can find the patch file for implementation here.
SmartCard API for Android might be of interest for you: http://code.google.com/p/seek-for-android/