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

html怎么做网站首页网络营销方式哪些

html怎么做网站首页,网络营销方式哪些,南昌seo实用技巧,客服源码一、功能简介 需求:开机自动开始搜网并显示网络列表 那么就不能将相关类做成单例,不能将subId、phoneId等卡相关的属性作为UI、服务的全局变量。 二、流程设计 NetworkSelectReceiver:监听开机广播,触发拉起搜网服务 NetworkOperatorService:搜网服务,完成后调起用户…

一、功能简介

需求:开机自动开始搜网并显示网络列表

那么就不能将相关类做成单例,不能将subId、phoneId等卡相关的属性作为UI、服务的全局变量。

二、流程设计

NetworkSelectReceiver:监听开机广播,触发拉起搜网服务

NetworkOperatorService:搜网服务,完成后调起用户界面

NetworkOperatorList:网络模式列表,显示搜网结果

三、开发代码

(一)NetworkSelectReceiver

接收器配置 AndroidManifest.xml

        <receiverandroid:name=".settings.network.NetworkSelectReceiver"android:exported="true"><intent-filter><action android:name="android.intent.action.BOOT_COMPLETED" /><action android:name="android.intent.action.SIM_STATE_CHANGED" /></intent-filter></receiver>

内部逻辑

onReceive => checkAndUpdateKeyWhenFirstBoot => getNetworkSelectionModeForPhone

public class NetworkSelectReceiver extends BroadcastReceiver {private Context mContext;private SubscriptionManager mSubscriptionManager;private static final int EVENT_GET_NETWORK_SELECTION_MODE_DONE = 300;private static final String DATA_PHONE_ID = "phone_id";private final static String TAG = "NetworkSelectReceiver ";//1、监听开机广播@Overridepublic void onReceive(Context context, Intent intent) {mcontext = context;if (TelephonyManager.getDefault().isMultiSimEnabled()) { //双卡设备mSubscriptionManager = (SubscriptionManager) context.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);List<SubscriptionInfo> mSubscriptionInfoList = mSubscriptionManager.getActiveSubscriptionInfoList();int phoneCount = TelephonyManager.getDefault().getPhoneCount();if (mSubscriptionInfoList == null) {Log.d(TAG, "onReceive, no ActiveSubscriptionInfoList, phoneCount = " + phoneCount);return ;} else {Log.d(TAG, "onReceive, mSubscriptionInfoList = " + mSubscriptionInfoList + ", phoneCount = " + phoneCount);}//遍历并操作每一张卡。for (int i = 0; i < phoneCount; i++) {if (SubscriptionManager.isValidPhoneId(i)) {Log.d(TAG,"onReceive, isValidPhoneId = " + i);checkAndUpdateKeyWhenFirstBoot(context, i);}}} else {}//单卡逻辑}  //onReceive//2、场景校验(根据需求添加)private boolean checkAndUpdateKeyWhenFirstBoot(Context context, int phoneId) {Log.d(TAG,"checkAndUpdateKeyWhenFirstBoot, phoneId = " + phoneId);SharedPreferences prefs = ShowNetworkUtils.getSharedPreferences(context);String simKey = NetworkUtils.KEY_FIRST_BOOT + phoneId;//没有用到卡信息,此处用于debug,确认双卡是否正常TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);String mccmnc = "";if (tm == null) {return false;} else {mccmnc = tm.getSimOperatorNumericForPhone(phoneId);}int simState = tm.getSimState(phoneId);Log.d(TAG,"checkAndUpdateKeyWhenFirstBoot, simState = " + simState + ", mccmnc =" + mccmnc);//卡没加载好以及飞行模式下不发起搜网boolean isEnabled = (Settings.Glob
http://www.hkea.cn/news/869765/

相关文章:

  • 东丽区做网站网站查询平台
  • wordpress什么主题好用seo优化范畴
  • 局域网端口映射做网站西安竞价托管代运营
  • 重庆网站建设设计公司信息ip网站查询服务器
  • 网站积分的作用seo搜索引擎优化就业前景
  • 珠海网站品牌设计公司简介最新国内新闻重大事件
  • 广东专业网站客服软件定制站长统计app下载大全
  • 广东网站建设公司排名磁力帝
  • 胶南网站建设哪家好成都电脑培训班零基础
  • 集团网站建设哪家好网上推广怎么弄?
  • dz网站建设器最近有新病毒出现吗
  • 个人网站制作说明香港旺道旺国际集团
  • 监控做直播网站免费网站seo
  • 网站建设洪塔网站搜索优化排名
  • 专业做设计师品牌网站深圳百度总部
  • 网站兼容工具seo关键词排名优化教程
  • O2O网站制作需要多少钱美区下载的app怎么更新
  • 上海做网站 公司做电商必备的几个软件
  • caozi.com网站建设中百度指数如何分析数据
  • 互联网舆情处置公司武汉seo外包平台
  • 消防器材网站建设背景seo工作职位
  • 专业网站制作公司名称seo咨询茂名
  • 做b2c网站建网站seo
  • 代理注册香港公司seo技术交流论坛
  • 想要提高网站排名应该怎么做seo网站推广费用
  • 专业做食材网站seo链接优化建议
  • 做画册的网站附近哪里有计算机培训班
  • 大兴建站推广google登录
  • 长春个人做网站哪家好百度指数热度榜
  • 嘉兴手机网站开发费用百度学术论文官网入口