How to read location only once with locationManager (GPS and NETWORK PROVIDER) and not any more looking for updates of location?

后端 未结 7 1586
鱼传尺愫
鱼传尺愫 2020-12-09 08:59

How to read location only once with locationManager (GPS and NETWORK PROVIDER) and not any more looking for updates of location, to save battery?

7条回答
  •  一个人的身影
    2020-12-09 09:23

    Using requestSingleUpdate with your LocationManager. For more info, official guide is interesting: INFO

提交回复
热议问题