Is there a way in Android Studio to calibrate the sensors of a mobile phone programmatically ?
So i have been building an AR Application that makes use of magnetic compass to get user orientation (getOrientation() of Android Sensor Manager). While testing it, i realized that on 80% of devices it is working GREAT but on some devices i am getting a major deflection from expected user orientation value. I have found articles about the user making a figure 8 with their device to recalibrate the compass and this works. Is there a way to reset the compass programmatically?