Version 17 released!
This commit is contained in:
parent
10a77ecc96
commit
d7d729f6c1
4 changed files with 11 additions and 7 deletions
|
|
@ -15,6 +15,7 @@ import android.telephony.CellInfoLte;
|
|||
import android.telephony.CellInfoWcdma;
|
||||
import android.telephony.NeighboringCellInfo;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.telephony.gsm.GsmCellLocation;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -117,10 +118,15 @@ public class CSVWriter {
|
|||
if(netInfo == null)
|
||||
return "n/a";
|
||||
|
||||
if(netInfo.getType() == ConnectivityManager.TYPE_MOBILE) {
|
||||
TelephonyManager telMan = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
|
||||
TelephonyManager telMan = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
if(telMan != null) {
|
||||
StringBuilder data = new StringBuilder();
|
||||
|
||||
GsmCellLocation location = (GsmCellLocation) telMan.getCellLocation();
|
||||
if(location != null)
|
||||
return ""+location.getCid();
|
||||
|
||||
List<NeighboringCellInfo> cellList = telMan.getNeighboringCellInfo();
|
||||
if(cellList != null) {
|
||||
for (int i = 0; i < cellList.size(); i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue