我有一个使用.so
文件的Android应用程序,.so
根据手机连接的网络更改了他的行为,即如果您已连接到AT&T
,则需要执行此操作XYZ
。如果您使用Verizon
,则执行ABC
,否则执行XY
。
答案 0 :(得分:2)
您可以使用AT+COPS?
命令获取当前使用的PLMN。来自27.007:
+COPS? +COPS: <mode>[,<format>,<oper>[,<AcT>]]
...
Read command returns the current mode, the currently selected operator and the
current Access Technology. If no operator is selected, <format>, <oper> and <AcT>
are omitted.
...
<oper>: string type; <format> indicates if the format is alphanumeric or numeric;
long alphanumeric format can be upto 16 characters long and short format up to 8
characters (refer GSM MoU SE.13 [9]); numeric format is the GSM Location Area
Identification number (refer 3GPP TS 24.008 [8] subclause 10.5.1.3) which
consists of a three BCD digit country code coded as in ITU-T E.212 Annex A
[10], plus a two BCD digit network code, which is administration specific;
returned <oper> shall not be in BCD format, but in IRA characters converted from
BCD; hence the number has structure: (country code digit 3)(country code digit 2)
(country code digit 1) (network code digit 3)(network code digit 2)(network code
digit 1)
答案 1 :(得分:0)
使用以下两个at
命令(see also)
AT+COPN 7.21 - Read operator names
AT+COPS 7.3 - PLMN selection