SHARE
TWEET

Untitled

a guest Jun 20th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. }
  2.  
  3. GsmCellLocation cellLocation = (GsmCellLocation) telephonyManager.getCellLocation();
  4.         String networkOperator = telephonyManager.getNetworkOperator();
  5.         String networOperatorName = telephonyManager.getNetworkOperatorName();
  6.         String networkTyInfo = String.valueOf(telephonyManager.getNetworkType());
  7.  
  8.  
  9. int mnc = 0, mcc = 0;
  10.         if (!TextUtils.isEmpty(networkOperator)) {
  11.             mcc = Integer.parseInt(networkOperator.substring(0, 3));
  12.             mnc = Integer.parseInt(networkOperator.substring(3));
  13.         }
  14.         int cid =0;
  15.         int lac = 0;
  16.         if (cellLocation != null) {
  17.              cid = cellLocation.getCid();
  18.              lac = cellLocation.getLac();
  19.         }
  20.  
  21.  GSMValues gsmValues = new GSMValues(String.valueOf(lac), String.valueOf(mcc), String.valueOf(mnc), String.valueOf(cid), String.valueOf(0),networkTyInfo,signalStrength,networOperatorName);
  22.         // db = new DatabaseHelper(getApplicationContext());
  23.  
  24.         // db.StoreLocations(gsmValues);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top