2

For tracking devices with BTS, I need CID and Lac. In some device like Asus and Huawei when location(gps) is off cant tracking and return null all of these methods.

    /** Current Location Area Code */
    int mCurLAC = 0;
    /** Current Location Cell ID */
    int mCurCID = 0;


       TelephonyManager mTelephonyManager = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE);

       GsmCellLocation gsmCellLocation = (GsmCellLocation) mTelephonyManager.getCellLocation();

       CellLocation cellLocation = mTelephonyManager.getCellLocation();
       List<NeighboringCellInfo> mNeighboringCellInfo = mTelephonyManager.getNeighboringCellInfo();
       List<CellInfo> allCellInfo = mTelephonyManager.getAllCellInfo();
       mCurCID = gsmCellLocation.getCid();
       mCurLAC = gsmCellLocation.getLac();

gsmCellLocation return null

mNeighboringCellInfo return null

allCellInfo return null

cellLocation return null

How to get current location when GPS is off ?

Shahab Saalami
  • 862
  • 10
  • 18

0 Answers0