安卓Gensoid K73(安卓get)
安卓系統讀取sim卡的是哪一個程序,在哪一個地方?
Android開發,讀取SIM是com.android.phone 在/system/app目錄下的,如果手機沒有root權限是無法查看的
代碼中讀取sim卡的代碼如下:
1.在AndroidManifest.xml添加權限:
2.通過context對象獲取TelephonyManager tManager類的實例
3.獲取設備當前位置
String location = tManager.getCellLocation()==null? "未知地區":tManager.getCellLocation().toString();
4.獲取手機制式
String simOperatorName = tManager.getSimOperatorName().equals("")?"未知":tManager.getSimOperatorName().toString();
5.獲取SIM卡運營商名稱
String networkOperatorName = tManager.getNetworkOperatorName()==null? "未知":tManager.getNetworkOperatorName().toString();
6.獲取SIM卡號
String line1Number = tManager.getLine1Number()==null? "未知":tManager.getLine1Number().toString();
總結
以上是生活随笔為你收集整理的安卓Gensoid K73(安卓get)的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: 研究死锁–第5部分:使用显式锁定
 - 下一篇: 使用工厂方法模式设计最佳实践