自注册DM(四)CMCC移动DM 实现方法

[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. 自注册在cmcc 终端测试查看结果,输入IMEI,选择时间时一定要范围大点 3月到10月 因为他的时间不准  
[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. 手机Debug模式也可以测试,测试时换卡就行,不用重起和刷机,最重要打开4G数据连接  
[java]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. getPhoneCount()   
  2. TelephonyManager    getPhoneCount()  
  3. getGsmDeviceId(int phoneId)   
  4. 1  SystemProperties.get("persist.radio.imei""");  
  5. 2  SystemProperties.get("persist.radio.imei1""");  
  6. getCdmaDeviceId()         
  7. SystemProperties.get("persist.radio.meid","");  
  8. getSubscriberId(int phoneId)      
  9. TelephonyManager    getSubscriberId(subId)  
  10. getIccId(int phoneId)     
  11. TelephonyManager    getSimSerialNumber(subId)  
  12. getDataState(int phoneId)     
  13. TelephonyManager    getDataState(subId)  
  14. getSimState(int phoneId)      
  15. TelephonyManager    getSimState(slotid)  
  16. getNetworkType(int phoneId)   
  17. TelephonyManager    getNetworkType(int subId)  
  18. getMasterPhoneId()    
  19. SubscriptionManager getPhoneId(int defDataSubId)  
  20. isInternationalNetworkRoaming(int phoneId)    
  21. TelephonyManager    isNetworkRoaming(subId)  
  22. getVoLTEState(int phoneId)    
  23. 参考后面实现  "  
  24. public int getVoLTEState(int phoneId) {  
  25.         int result = VOLTE_STATE_UNKNOWN;  
  26.         if (phoneId >= 0 && phoneId < 2) {  
  27.                 // phoneId specified in parameter list is actually slot ID  
  28.                 phoneId = SubscriptionManager.getPhoneId(getSubIdForSlotId(phoneId));  
  29.                 try {  
  30.                     Method method = ImsManager.class.getDeclaredMethod(  
  31.                         ""isEnhanced4gLteModeSettingEnabledByUser"",  
  32.                         Context.class,  
  33.                         Integer.class);  
  34.                     boolean enabled =  
  35.                         (Boolean) method.invoke(nullnew Object[]{mContext, phoneId});  
  36.                     result = enabled ? VOLTE_STATE_ON : VOLTE_STATE_OFF;  
  37.                 } catch (NoSuchMethodException e1) {  
  38.                     if (phoneId == 0) {  
  39.                         boolean enabled =  
  40.                             ImsManager.isEnhanced4gLteModeSettingEnabledByUser(mContext);  
  41.                         result = enabled ? VOLTE_STATE_ON : VOLTE_STATE_OFF;  
  42.                     } else {  
  43.                         result = VOLTE_STATE_UNKNOWN;  
  44.                     }  
  45.                 } catch (Exception e2) {  
  46.                     e2.printStackTrace();  
  47.                     result = VOLTE_STATE_UNKNOWN;  
  48.                 }  
  49.         }  
  50.         return result;  
  51.     }"  
  52. getAPNContentUri(int phoneId)     
  53. 参考后面实现    
  54. "public Uri getAPNContentUri(int phoneId) {  
  55.         String result = null;  
  56.         if (phoneId >= 0 && phoneId < 2) {  
  57.             int subId = getSubIdForSlotId(phoneId);  
  58.             if (subId >= 0) {  
  59.                 result = ""content://telephony/carriers/subId/"" + subId;  
  60.             }  
  61.         }  
  62.         MLog.d(""getContentUri("" + phoneId + ""): "" + result);  
  63.         return result == null ? null : Uri.parse(result);  
  64.     }"  
  65. getSlotId (int phoneId)       
  66. getCellId (int phoneId)       
  67. "CellLocation loc = TelephonyManager.getDefault().getCellLocationForSubscriber(slotId);  
  68.         if (loc instanceof GsmCellLocation) {  
  69.             CELLID :    ((GsmCellLocation)loc).getCid()  
  70.             LAC:          ((GsmCellLocation)loc).getLac()  
  71.         }"  
  72.           
  73.           
  74.           
  75.           
  76.     getLac (int phoneId)   
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值