Android getbearing only returns 0.0. Trying to use to rotate current location icon

£可爱£侵袭症+ 提交于 2019-12-01 01:45:02

What is location provider? If it NETWORK_PROVIDER, then you won't get bearing, because its accuracy is to low, to detect bearing.

Try your app outside and with GPS_PROVIDER?

Problem solved! Thanks to Aleksejs for your efforts - turned out it was a case of PICNIC.

I had set the GPS to update at the smallest movement, and as the location was jumping around I assumed it should be able to work out bearing and get on with it.

When testing out the result from 'getSpeed()' I noticed bearing working - turns out you have to move a little further than around the garden to give it time to work out your bearing.

Regards

Nick

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!