Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/231.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java CellIdentityGSM&;CellInfoGsm_Java_Android - Fatal编程技术网

Java CellIdentityGSM&;CellInfoGsm

Java CellIdentityGSM&;CellInfoGsm,java,android,Java,Android,我想知道如何使用CellIdentityGsm和CellInfoGsm。 我尝试了很多方法,但都没有成功,我尝试的最新代码是: List <CellInfo> cellInfo1 = (List<CellInfo>) tm.getAllCellInfo(); for (CellInfo cellInfo2 : cellInfo1) { CellInfoGsm cellInfoGsm1 = (CellInfoGsm) cellInfo2; CellIdent

我想知道如何使用CellIdentityGsm和CellInfoGsm。 我尝试了很多方法,但都没有成功,我尝试的最新代码是:

List <CellInfo> cellInfo1 = (List<CellInfo>) tm.getAllCellInfo();
for (CellInfo cellInfo2 : cellInfo1) {
    CellInfoGsm cellInfoGsm1 = (CellInfoGsm) cellInfo2;
    CellIdentityGsm cellIdentityGsm1 = cellInfoGsm1.getCellIdentity();

    int Mcc = cellIdentityGsm1.getMcc();
    view = (TextView) findViewById(R.id.mCC);
    view.setText("MCC: " + Mcc);
}
List cellInfo1=(List)tm.getAllCellInfo();
对于(CellInfo cellInfo2:cellInfo1){
CellInfoGsm cellInfoGsm1=(CellInfoGsm)cellInfo2;
CellIdentityGsm cellIdentityGsm1=cellInfoGsm1.getCellIdentity();
int-Mcc=cellIdentityGsm1.getMcc();
视图=(TextView)findViewById(R.id.mCC);
view.setText(“MCC:+MCC”);
}

Android文档通常是此类非常一般信息的来源。怎么用它做什么?“你想干什么?”汤姆无意中说。这一定是复制粘贴手指的失误。很好,你修好了。