Use GPS and Network Provider at the same time in Android

前端 未结 2 558
面向向阳花
面向向阳花 2020-12-13 10:03

I have implemented a locationlistener in my app which uses the Network Provider.

This all works fine because i want a location quickly and with GPS Provider it takes

2条回答
  •  -上瘾入骨i
    2020-12-13 10:43

    Ideally, if you are not concerned on the battery usage, then it perfectly fine to use both providers. As Daren explained, you can filters the coordinates by using getProvider() and getAccuracy().

    http://blog.shinetech.com/2011/10/14/a-good-look-at-android-location-data/

提交回复
热议问题