I am creating an android compass application.
However, I want to add a functionality where the compass will point to some co ordinate that I have specified.
How can I achieve this.
Thanks and Regards,
Rohit Savant
I am creating an android compass application.
However, I want to add a functionality where the compass will point to some co ordinate that I have specified.
How can I achieve this.
Thanks and Regards,
Rohit Savant
Copyright © 2021 Jogjafile Inc.
For what you want to achieve you will need 2 Locations, your own and that of the target. Then you can use the
bearingTo()
method to determine the angle from you to the target: