Location returns 0.0 with WIFI/3G/4G in Lollipop 5.0.2

前端 未结 3 1291
难免孤独
难免孤独 2021-01-14 01:08

I am trying to fetch location based on WiFi/3G/4G connection but it always returns 0.0 as latitude and longitude. If same code is used

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-14 01:51

    I think using FusedLocationApi would be a better solution see https://developer.android.com/training/location/retrieve-current.html

提交回复
热议问题