In the Google Maps application, there is a small blue arrow that points in the direction the uses is facing. How can I duplicate this in my app? Please provide sample code.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I had an app where I had to get direction the device was pointing in. In order to get this value, you have to setup a SensorManager and a SensorListener. Here is the basic code to get it going. You will of course have to do some tweaking based on the declination (difference between true north and magnetic north).