当前位置: 首页 > news >正文

网站空间ip能做视频的软件有哪些

网站空间ip,能做视频的软件有哪些,wordpress广告链接,电子版简历怎么弄业务场景 双卡设备进行网络等业务时,需要正确操作对应的卡。 执行卡业务和主要是使用subId和 PhoneId/SlotId进行区分隔离。 代码举例 初始化subId //初始化subId private int mSubId SubscriptionManager.INVALID_SUBSCRIPTION_ID;//1、通过intent传值&#x…

业务场景

双卡设备进行网络等业务时,需要正确操作对应的卡。

执行卡业务和主要是使用subId和 PhoneId/SlotId进行区分隔离。

代码举例

初始化subId

//初始化subId
private int mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;//1、通过intent传值(常用场景),默认为invaildId
int mSubId = intent.getIntExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX,SubscriptionManager.INVALID_SUBSCRIPTION_ID);//2、根据注册信息subscriptionInfo
private SubscriptionInfo mSub; //接口传值初始化,认为已经非null
mSubId = mSub.getSubscriptionId();//3、通过Phone全局常量
mSubId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, 0);//4、根据Phone对象
int mSubId = phone.getSubId();//5、根据卡槽获取
int mSubId = getSubId(soltId);

1、获取CarrierConfig 运营商配置

private PersistableBundle mCarrierConfig = null;
//通过subId获取CarrierConfig
CarrierConfigManager configManager = (CarrierConfigManager)getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
mCarrierConfig = configManager.getConfigForSubId(mSubid);

2、获取TelephonyManager

TelephonyManager tm = (TelephonyManager)getContext().getSystemService(Context.TELEPHONY_SERVICE);
tm = tm.createForSubscriptionId(mSubid);  //关键点,拿到对应subId的tm
String mImsi = tm.getSubscriberId(mSubid);  //imsi?not subid?

3、获取Phone 对象

if (mSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {int mPhoneId = SubscriptionManager.getPhoneId(mSubId); 
}

综合

private boolean setOperatorNetworkInfo(Context context, int slotId, int subId) {SubscriptionManager subscriptionManager = SubscriptionManager.from(context);TelephonyManager telephonyManager = TelephonyManager.from(context);//能直接调接口就不要调嵌套的啦,上面的TelephonyManager 初始化等同于下//TelephonyManager telephonyManager = context.getSystemService(Context.TELEPHONY_SERVICE);int mSubId = getSubId(soltId);if(soltId >= 0 && soltId < PHONE_COUNT){Phone phone = PhoneFactory.getPhone(soltId);SubscriptionInfo subInfo = subscriptionManager.getActiveSubscriptionInfo(subId);String mccmnc = telephonyManager.getSimOperator(subId);String imsi = telephonyManager.getSubscriberId(subId);}}//======== 相关源码类 SubscriptionManager & TelephonyManager =========/*** @deprecated developers should always obtain references directly from*             {@link Context#getSystemService(Class)}.*/@Deprecatedpublic static SubscriptionManager from(Context context) {return (SubscriptionManager) context.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);}/** {@hide} */@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)public static TelephonyManager from(Context context) {return (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);}

其他相关说明

【笔记】Android Telephony | SIM 卡管理和subId、slotId、phoneId 定义关系说明-CSDN博客

http://www.yayakq.cn/news/816841/

相关文章:

  • 赣州网站建设价格传奇来了网页版
  • 求网站建设和网页设计的电子书张家界优秀网站建设
  • 怎么查询建设通网站图怪兽作图神器下载
  • 网站开发用到哪些技术郑州航空港建设局网站
  • 网站浏览器不兼容怎么办优化网站具体如何做
  • 网站改版做301东莞做企业营销型网站的公司
  • 企业网站建设飞沐织梦做响应式网站
  • 推荐常州网站建设公司如何选择大良网站建设
  • 东莞网站制作培训多少钱网站的毕业设计怎么做
  • 建站公司海报制作
  • 如何把自己做的网站放到网上阿里巴巴网站建设的功能定位
  • 学校多语言网站建设郑州教育信息网
  • 企业网站策划书ppt融资计划书
  • 惠州公司网站建设下载app到手机
  • 深圳龙华建设局官方网站如皋官方网站建设什么地铁
  • 网站是先解析后备案吗什么是电子商务网站推广
  • 做戒烟网站素材wordpress设置前台投稿
  • 上海机电设备公司网站建设wordpress 列表 分类
  • 网站建设属于设备吗医疗器械公司网站建设
  • 酒店网站策划书机房托管
  • 网站优化培训百度网盟 网站定向
  • 茶文化网站开发旅游机票网站建设
  • 毕业设计做网站论文好写吗网站注销备案查询系统
  • 区网站建设wordpress最新文章调用
  • 网站域名后缀西安线上推广公司
  • 塘厦镇做网站十种营销方法
  • php网站培训班网站设计制作的连接方式
  • 长尾词挖掘免费工具宁波seo搜索排名优化
  • 视频变成网站怎么做wordpress进不了
  • 做外贸兼职的网站有哪些seo高级