This is an old revision of the document!
Compass issues with smartphones are a well known issue and can appear on Android as well as iOS devices. The issue seems to be generated by electric fields of the smartphone or your surrounding. But calibrating your phone is very easy. There are two methods, either turning your phone along every axe, or performing a figure 8 like motion with your smartphone in your hand.
Have a look at this short video, that will show you how to perform the movement.