LocationCallback not getting called

后端 未结 5 1205
醉酒成梦
醉酒成梦 2021-01-07 18:18

I am making a location request using FusedLocationProviderClient. I have kept a timer for 30 seconds to check if location is received within that timeframe.

5条回答
  •  粉色の甜心
    2021-01-07 19:09

    You need to request only the following permission:

    Manifest.permission.ACCESS_FINE_LOCATION
    

    I had the same issue and I was requesting both permissions with:

    Manifest.permission.ACCESS_COARSE_LOCATION
    

    When I removed COARSE LOCATION I got the update almost immediately.

提交回复
热议问题