How to find my current location (latitude + longitude) in every 5 second in Android?

后端 未结 4 1723
无人共我
无人共我 2021-01-26 01:45

I tried many code snippets but all the example takes too much time to provide latitude and longitude .

I want to get current latitude in every 5 seconds .

4条回答
  •  天涯浪人
    2021-01-26 01:53

    You can use this post to achieve what you are looking for. Look at the setInterval(5000) will do that

提交回复
热议问题