Code example for GsmCellLocation

Methods: getCidgetLac

0
		} 
		 
		/** CellID Lookup **/	 
		GsmCellLocation location = (GsmCellLocation) telephonyManager.getCellLocation();
		try { 
		int cid = location.getCid();
		int lac = location.getLac();
		if (Integer.toString(cid) != null && Integer.toString(lac) != null) {
			Log.v("CellID Information", Integer.toString(cid));
			Log.v("Location Area Code Information", Integer.toString(lac));
		} 
		} 
		catch (NullPointerException e) {
			String err = (e.getMessage()==null)?"CellID Information OR Location Area Code Information":e.getMessage();
			Log.e("GSMCellLocation Exception", err);
		} 
 
 
		 
		String networkOperator = telephonyManager.getNetworkOperator();