0

I am trying to add compass calibrate option in my app same like in maps app or Whatsapp. https://www.howtogeek.com/519142/how-to-calibrate-the-compass-on-android-to-improve-device-location-accuracy/

I am trying to find if it comes with the sdk or do I need to implement it manually.

Omkar Frozen
  • 157
  • 9

1 Answers1

0

Compass calibration isn't implemented in software. Just wave the device in a figure-8 pattern as shown in your link. The Google Maps app just contains instructions for how to do it, and provides a convenient way to see if it worked.

Kevin Krumwiede
  • 9,868
  • 4
  • 34
  • 82
  • I want to add that feature in my app – Omkar Frozen Mar 31 '20 at 20:14
  • @OmkarFrozen So you're asking how to add a dialog with a picture of someone waving their phone in a figure-8 pattern? – Kevin Krumwiede Mar 31 '20 at 21:33
  • no, basically I need to have that feature to rotate the map along with phone movement in my app which is using google map – Omkar Frozen Apr 01 '20 at 18:17
  • @OmkarFrozen Orienting the map and calibrating the compass are two different things. – Kevin Krumwiede Apr 01 '20 at 22:22
  • @KevinKrumwiede Check this: https://stackoverflow.com/questions/1747654/error-cannot-modify-the-return-value-c-sharp Even CSC tells you that is a copy, if you try to modify a struct that is property it will say: *An attempt was made to modify **a value type that was the result of an intermediate expression**.Because the value is not persisted, the value will be unchanged* If it were not a copy you would be able to modify a variable of a struct used in a property. – Gusman Oct 24 '20 at 09:05