如何让现有GSM网络的列表? [英] how to get a list of available gsm networks?

查看:186
本文介绍了如何让现有GSM网络的列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在写关于Android 2.1的一些片code的是应该测量GSM信号的信号强度。
我需要的是某种名单以某种匹配相应的信号strengthes网络ID ...
我走到这一步:

i'm currently writing on some piece of code in android 2.1 that is supposed to measure the signal strength of the gsm signals. what i need is some kind of list with some kind of network IDs matching the corresponding signal strengthes... i got this far:

public class main extends Activity {
    TelephonyManager telManager;
    GSMListener gsmListener;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        gsmListener = new GSMListener();

        telManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
        telManager.listen(gsmListener ,PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);

    }

    private class GSMListener extends PhoneStateListener {
        /* Get the Signal strength from the provider, each time there is an update */
        @Override
        public void onSignalStrengthsChanged(SignalStrength signalStrength) {
            super.onSignalStrengthsChanged(signalStrength);

            Toast.makeText(main.this, "GSM Cinr: " + signalStrength.getGsmSignalStrength(), Toast.LENGTH_SHORT).show();
        }
    };
}

但在这一点上,我不知道是否有网络ID就像BSSID的WiFi网络?这是怎么与GSM处理?我需要确定GSM网络我得到的信号强度。

but at this point, i wonder if there's network-id like the bssid for wifi networks? how is this handled with gsm? i need to identify the gsm network i'm getting the signal strength of.

编辑:

由网络ID,意思是小区ID。我需要的是在范围内 *所有可用* GSM网络及其接收质量的列表。操作-id是没有太大的兴趣给我的,因为我需要确定细胞和网络,我碰到的信号强度。

by "network-id", meant "cell-id". what i need is a list of *all available* gsm networks in range and their reception quality. the operator-id is not of much interest to me, as i need to identify cell AND network, i'm getting the signal strength from.

推荐答案

每个运营商都有一个唯一的ID,一个叫PLMN(公共陆地移动网络)的5位数字。

Every operator has a unique ID, a 5 digit number called PLMN (Public land mobile network).

这号由后面3个数字的MCC(移动国家code)的2位MNC(移动网code)。

That number consists of a 3-digit MCC (Mobile Country Code) followed by a 2-digit MNC (Mobile Network Code).

借助维基百科列表是一个相对完整的清单。

The wikipedia list is a relatively complete list.

这篇关于如何让现有GSM网络的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆