wliment
11/4/2013 - 2:56 PM

android 获取基站的lac和此

android 获取基站的lac和此


    private void get_lac(){


        TelephonyManager mTelephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);

        GsmCellLocation location = (GsmCellLocation) mTelephonyManager.getCellLocation();

        int lac = location.getLac();

        int cellId = location.getCid();

        Log.i(TAG, "\t LAC = " + lac + "\t CID = " + cellId);
        TextView myTextView = (TextView) findViewById(R.id.www);
        myTextView.setText( "lac Is:"+Integer.toString(lac)+ "\nci is : "+Integer.toString(cellId));
        Log.i(TAG, "MainActivity-->onStart  blabalaballba");



    }