androidandroid-9.0-piecellinfo

How to get Cell ID and Location Area code in android 9 ( Pie ) devices without using GPS?


I tried getAllCellInfo(), getCellLocation() and getNeighboringCellInfo() to get Cell ID and Location Area Code. I got the values(Cell ID and Location Area Code) when the GPS is turned into ON state and Without GPS these methods return null

So what i do to get the Cell ID and Location Area Code without using GPS?


Solution

  • Telephony information now relies on device location setting

    If the user has disabled device location on a device running Android 9, the following methods don't provide results:

    getAllCellInfo()
    listen()
    getCellLocation()
    getNeighboringCellInfo()