You can not rely on the compass to be accurate, it is always an indication. Compasses in iPhones are relatively precise, but the quality of the compasses in Android phones varies greatly. Also the readings can be disturbed by a million external factors that you can not control or predict.
There isn’t really a reliable way of telling whether or not a compass needs calibration. To know if the value you’re getting from the sensor is correct you would need the real world heading to compare it to, so you’ve got yourself a bit of a chicken and egg problem.
I have the same issue. The thing is I am getting correct values in build or native compass apps but when using unity, the values are really really different and completely wrong!!!
Same here, galaxy tab s5e,i found that you must not use magnetic covers for the device, it gets inacurate readings, and if you left your tablet off for a while, you should rotate and flip in order to calibrate it