Android GsmCellLocation.getCellLocation返回NULL
Android GsmCellLocation.getCellLocation返回NULL
 1、首先 获取服务 telephonyManager =(TelephonyManager)
getSystemService(TELEPHONY_SERVICE);
	// 2、注册监听器 telephonyManager.listen(celllistener,
	// PhoneStateListener.LISTEN_CELL_LOCATION); // 基站位置的变化
	//
	// 3、编写监听代码
	// public PhoneStateListener celllistener = new PhoneStateListener() {
	// @Override
	// public void onCellLocationChanged(CellLocation location) {
	// super.onCellLocationChanged(location);
	// // 判断 location的类型 是GsmCellLocation 还是 CdmaCellLocation
	// // 最后 根据你的业务 需求 实现你的代码
	//
	// }
	// };
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号