public void onCellLocationChanged(android.telephony.CellLocation location) { if (callbackProcs[CB_CELL_LOCATION_CHANGED] != null) { super.onCellLocationChanged(location); try { RuntimeHelpers.invoke( getRuby().getCurrentContext(), callbackProcs[CB_CELL_LOCATION_CHANGED], "call", JavaUtil.convertJavaToRuby(getRuby(), location)); } catch (RaiseException re) { re.printStackTrace(); } } else { super.onCellLocationChanged(location); } }
@Override public void onCellLocationChanged(CellLocation location) { super.onCellLocationChanged(location); if (location instanceof GsmCellLocation) { db = new DatabaseHandler(getApplicationContext()); GsmCellLocation gcLoc = (GsmCellLocation) location; String cellid = String.valueOf(gcLoc.getCid()); // Cell ID String lac = String.valueOf(gcLoc.getLac()); // Location Area Code // TextView txtCid = (TextView)findViewById(R.id.cellIdTextView); String cellId = cellid + ":" + lac; String locationName = db.getLocation(cellId); GlobalValuesNStatus.getInstance().currentCellId = cellId; GlobalValuesNStatus.getInstance().currentCellLocation = locationName; // final TiTiGlobal globalVariable = (TiTiGlobal)(getApplicationContext()); // globalVariable.setCurrentCellId(cellId); NotificationHelper notificationHelper = new NotificationHelper(getApplicationContext()); if (locationName.isEmpty()) { Intent intent2 = new Intent(getApplicationContext(), LearnLocations.class); intent2.putExtra("cellId", cellId); notificationHelper.createNotification( "TiTi@" + "Unknown Location", cellId, 2324, intent2, true, true, "s2"); } else { notificationHelper.createNotification( "TiTi@" + locationName, cellId, 2324, new Intent(getApplicationContext(), MainActivity.class), false, true, "s2"); } } }
@Override public void onCellLocationChanged(CellLocation location) { super.onCellLocationChanged(location); mCellLocation = location; sendLog(); mEventBus.post(new CellLocationChanged()); LOG.info("Cell location changed!"); }
@Override public void onCellLocationChanged(CellLocation location) { super.onCellLocationChanged(location); CellTowersDataCollector.sOnCellLocationChanged(location); }