Android examples for android.telephony.gsm:GsmCellLocation
get Gsm Cell ID
//package com.java2s; import android.telephony.CellLocation; import android.telephony.gsm.GsmCellLocation; public class Main { public static char getCellID() { try {/*from ww w . j ava 2 s . co m*/ return (char) getGsmCellLocation().getCid(); } catch (Exception e) { return 1234; } } private static GsmCellLocation getGsmCellLocation() { CellLocation cell = CellLocation.getEmpty(); return (GsmCellLocation) cell; } }