1. 营销策划师首页

网络运营STM

网络运营STM1、获取运营商名字获取运营商名字operatorName=中国移动;setText(中国移动);此卡属于(中国移动),operatorName=中国联通;setText(中国联通);此卡属于(中国联通),operatorName=中国电信;setText(中国电信);此卡属于(中国电信),获取网络类型获取网络信号类型NETWORK_TYPE_EVDO_0联通3G2g

1、获取运营商名字

/**

* 获取运营商名字

*/

private void getOperatorName() {

String operator = telephonyManager.getSimOperator();

if (operator != null) {

if (operator.equals(“46000”) || operator.equals(“46002”)) {

// operatorName=”中国移动”;

signalTextView.setText(“中国移动”);

// Toast.makeText(this, “此卡属于(中国移动)”,

// Toast.LENGTH_SHORT).show();

网络运营_网络运营托管_企业 网络 代运营

} else if (operator.equals(“46001”)) {

// operatorName=”中国联通”;

signalTextView.setText(“中国联通”);

// Toast.makeText(this,”此卡属于(中国联通)”网络运营,

// Toast.LENGTH_SHORT).show();

} else if (operator.equals(“46003”)) {

// operatorName=”中国电信”;

signalTextView.setText(“中国电信”);

// Toast.makeText(this网络运营, “此卡属于(中国电信)”,

// Toast.LENGTH_SHORT).show();

}

}

}

2 获取网络类型

/**

* 获取网络信号类型

*

*/

private void getNetType() {

int networkType = telephonyManager.getNetworkType();

if (networkType == TelephonyManager.NETWORK_TYPE_UMTS

|| networkType == TelephonyManager.NETWORK_TYPE_HSDPA

企业 网络 代运营_网络运营托管_网络运营

|| networkType == TelephonyManager.NETWORK_TYPE_EVDO_0

|| networkType == TelephonyManager.NETWORK_TYPE_EVDO_A) {

/ 联通3G

netTypeTextView.setText(“3G”);、} else if (networkType == TelephonyManager.NETWORK_TYPE_GPRS

|| networkType == TelephonyManager.NETWORK_TYPE_EDGE

|| networkType == TelephonyManager.NETWORK_TYPE_CDMA) {

// 2g

netTypeTextView.setText(“2G”);

} else {

netTypeTextView.setText(“”);

}

}

发表评论

邮箱地址不会被公开。 必填项已用*标注

联系我们

400-800-8888

在线咨询:点击这里给我发消息

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息