Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- }
- GsmCellLocation cellLocation = (GsmCellLocation) telephonyManager.getCellLocation();
- String networkOperator = telephonyManager.getNetworkOperator();
- String networOperatorName = telephonyManager.getNetworkOperatorName();
- String networkTyInfo = String.valueOf(telephonyManager.getNetworkType());
- int mnc = 0, mcc = 0;
- if (!TextUtils.isEmpty(networkOperator)) {
- mcc = Integer.parseInt(networkOperator.substring(0, 3));
- mnc = Integer.parseInt(networkOperator.substring(3));
- }
- int cid =0;
- int lac = 0;
- if (cellLocation != null) {
- cid = cellLocation.getCid();
- lac = cellLocation.getLac();
- }
- GSMValues gsmValues = new GSMValues(String.valueOf(lac), String.valueOf(mcc), String.valueOf(mnc), String.valueOf(cid), String.valueOf(0),networkTyInfo,signalStrength,networOperatorName);
- // db = new DatabaseHelper(getApplicationContext());
- // db.StoreLocations(gsmValues);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement