current location is always null

后端 未结 6 1882
独厮守ぢ
独厮守ぢ 2021-02-04 22:39

I am trying to retrieve my current location on the button click in an editbox using gps or network..i have tried all possible methods which i found in tutorials and older posts.

6条回答
  •  悲&欢浪女
    2021-02-04 23:09

    when we specify NETWORK_PROVIDER to listen for location updates,

    Android system makes use of wi-fi ids or internet access points to determine locations

    When there is no internet access, it returns null values

    Happened with me too, it doesnt get location from cell towers as expected

    read into this: no gprs/no wi-fi location updates

提交回复
热议问题