安卓手机网络模式、网络类型、网络种类
一、4G全网通手机的可选网络模式
手机电话中输入*#*#4636#*#*
网络模式(network mode),UMTS代表WCDMA/GSM,Global代表不支持TD-SCDMA的2G/3G
0,WCDMA preferred,支持WCDMA/GSM,WCDMA优先。
1,GSM only
2,WCDMA only
3,GSM auto(PRL),支持WCDMA/GSM,也叫GSM UMTS
4,CDMA auto(PRL),CDMA优先。支持CDMA和EVDO,当信号强度低时,CDMA网络受到优待选择
5,CDMA only,不支持EVDO,也叫CDMA_NO_EVDO
6,EvDo only,不支持CDMA,也叫EVDO_NO_CDMA
7,Global auto(PRL),支持WCDMA/GSM、EVDO、CDMA,也叫GSM/CDMA AUTO
8,LTE/CDMA auto(PRL),支持LTE、CDMA/EVDO,当4G信号低时,优先CDMA
9、LTE/UMTS auto(PRL),当4G信号低时,优先3G。也叫LTE/GSM AUTO
10、LTE/CDMA/UMTS auto(PRL),支持LTE、CDMA、WCDMA/GSM。也叫LTE/GSM/CDMA AUTO
11,LTE only
12,LTE/WCDMA
13,TD-SCDMA only
14,TD-SCDMA/WCDMA
15,LTE/TD-SCDMA
16,TD-SCDMA/GSM
17,LTE/TD-SCDMA/GSM,优先4G->TD-SCDMA->GSM
18,TD-SCDMA/UMTS,支持TD-SCDMA、WCDMA/GSM
19,LTE/TD-SCDMA/WCDMA
20,LTE/TD-SCDMA/UMTS,优先4G->TD-SCDMA->WCDMA/GSM,支持LTE、TD-SCDMA、WCDMA/GSM
21,TD-SCDMA/CDMA/UMTS,3G/2G全网通
22,Global/TD-SCDMA,4G/3G/2G全网通
UNKNOWN
分析
仅2G,模式1(GSM),模式5(CDMA)
仅3G,模式2(WCDMA),模式6(EVDO)
仅4G,模式11(LTE)
3G/2G,模式0(联通3G优先),模式3(联通),模式4(电信),模式7(联通+电信)
4G/3G,模式12(联通)
4G/3G/2G,模式8(电信),模式9(联通),模式10(联通+电信),模式20(移动+联通),模式22(移动+联通+电信)
二、网络模式
/* NETWORK_MODE_* See ril.h RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE */
WCDMA_PREF = 0; /* GSM/WCDMA (WCDMA preferred) */
GSM_ONLY = 1; /* GSM only */
WCDMA_ONLY = 2; /* WCDMA only */
GSM_UMTS = 3; /* GSM/WCDMA (auto mode, according to PRL)
CDMA = 4; /* CDMA and EvDo (auto mode, according to PRL)
CDMA_NO_EVDO = 5; /* CDMA only */
EVDO_NO_CDMA = 6; /* EvDo only */
GLOBAL = 7; /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
LTE_CDMA_EVDO = 8; /* LTE, CDMA and EvDo */
LTE_GSM_WCDMA = 9; /* LTE, GSM/WCDMA */
LTE_CDMA_EVDO_GSM_WCDMA = 10; /* LTE, CDMA, EvDo, GSM/WCDMA */
LTE_ONLY = 11; /* LTE Only */
LTE_WCDMA = 12; /* LTE/WCDMA */
TDSCDMA_ONLY = 13; /* TD-SCDMA only */
TDSCDMA_WCDMA = 14; /* TD-SCDMA and WCDMA */
LTE_TDSCDMA = 15; /* TD-SCDMA and LTE */
TDSCDMA_GSM = 16; /* TD-SCDMA and GSM */
LTE_TDSCDMA_GSM = 17; /* TD-SCDMA,GSM and LTE */
TDSCDMA_GSM_WCDMA = 18; /* TD-SCDMA, GSM/WCDMA */
LTE_TDSCDMA_WCDMA = 19; /* TD-SCDMA, WCDMA and LTE */
LTE_TDSCDMA_GSM_WCDMA = 20; /* TD-SCDMA, GSM/WCDMA and LTE */
TDSCDMA_CDMA_EVDO_GSM_WCDMA = 21; /*TD-SCDMA,EvDo,CDMA,GSM/WCDMA*/
LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 22; /* TD-SCDMA/LTE/GSM/WCDMA, CDMA, and EvDo */
5G手机
NR_ONLY = 23; /** NR 5G only mode */
NR_LTE = 24; /** NR 5G, LTE */
NR_LTE_CDMA_EVDO = 25; /** NR 5G, LTE, CDMA and EvDo */
NR_LTE_GSM_WCDMA = 26; /** NR 5G, LTE, GSM and WCDMA */
NR_LTE_CDMA_EVDO_GSM_WCDMA = 27; /** NR 5G, LTE, CDMA, EvDo, GSM and WCDMA */
NR_LTE_WCDMA = 28; /** NR 5G, LTE and WCDMA */
NR_LTE_TDSCDMA = 29; /** NR 5G, LTE and TDSCDMA */
NR_LTE_TDSCDMA_GSM = 30; /** NR 5G, LTE, TD-SCDMA and GSM */
NR_LTE_TDSCDMA_WCDMA = 31; /** NR 5G, LTE, TD-SCDMA, WCDMA */
NR_LTE_TDSCDMA_GSM_WCDMA = 32; /** NR 5G, LTE, TD-SCDMA, GSM and WCDMA */
NR_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 33; /** NR 5G, LTE, TD-SCDMA, CDMA, EVDO, GSM and WCDMA */
三、网络类型
NETWORK_TYPE_WIFI
NETWORK_TYPE_UNAVAILABLE
NETWORK_TYPE_UNKNOWN = 0;
NETWORK_TYPE_GPRS = 1;
NETWORK_TYPE_EDGE = 2;
NETWORK_TYPE_UMTS = 3,WCDMA向下兼容GSM网络
NETWORK_TYPE_CDMA = 4; /** Either IS95A or IS95B */
NETWORK_TYPE_EVDO_0 = 5; /** EVDO revision 0 */
NETWORK_TYPE_EVDO_A = 6; /** EVDO revision A */
NETWORK_TYPE_1xRTT = 7;
NETWORK_TYPE_HSDPA = 8;
NETWORK_TYPE_HSUPA = 9;
NETWORK_TYPE_HSPA = 10;
NETWORK_TYPE_IDEN = 11; /**网络是 iDen */
NETWORK_TYPE_EVDO_B = 12;
NETWORK_TYPE_LTE = 13;
NETWORK_TYPE_EHRPD = 14; /** 网络是 eHRPD */
NETWORK_TYPE_HSPAP = 15; /** 网络是 HSPA+ */
NETWORK_TYPE_GSM=16
NETWORK_TYPE_TD_SCDMA=17
NETWORK_TYPE_IWLAN = 18
说明
/** GPRS 2G(2.5),EDGE 2G(2.75G)
* UMTS 3G WCDMA
* CDMA 2G
* EVDO_0 3G (CDMA2000 1xEVDO) ,153.6kps - 2.4mbps
* EVDO_A,1.8-3.1mbps,3.5G
* 1xRTT 2G CDMA2000 1xRTT,144kbps 2G的过渡
* HSDPA 3.5G ,14.4mbps
* HSUPA 3.5G,1.4-5.8 mbps
* HSPA 3G (分HSDPA,HSUPA)
* IDEN 2G,Integrated Dispatch Enhanced Networks 集成数字增强型网络
* EVDO_B,EVDO Rev.B,14.7Mbps,3.5G
* LTE 4G
* EHRPD 3G,CDMA2000向4G的中间产物,Evolved High Rate Packet Data HRPD的升级
* HSPAP 3G HSPA+**/
四、网络种类,NETWORK_CLASS
NETWORK_TYPE_MOBILE = -100
NETWORK_CLASS_UNKNOWN=0,未知
判断网络种类
当NETWORK_TYPE_UNAVAILABLE,返回NETWORK_CLASS_UNAVAILABLE
当NETWORK_TYPE_WIFI,返回NETWORK_CLASS_WIFI
当NETWORK_TYPE_GPRS、EDGE、CDMA、1xRTT、IDEN,返回NETWORK_CLASS_2_G
当NETWORK_TYPE_UMTS、EVDO_0、EVDO_A、HSDPA、HSUPA、HSPA、EVDO_B、EHRPD、HSPAP,返回NETWORK_CLASS_3_G
当NETWORK_TYPE_LTE,返回NETWORK_CLASS_4_G
其他,返回NETWORK_CLASS_UNKNOWN