Qiblah direction determination is an algorithm that is based on three main factors. All of these factors can change what the app will display to you, and all smartphone apps that show you the direction of the Qiblah can be effected by these factors.Location of the Kabah
The first is the exact geographical position of the Holy Kabah - which is fixed and static, meaning it does not change. Our apps use the latitude and longitude of the Kabaah that is determined easily using any mapping software.Location of the Device
The second factor is the geographical position, or latitude and longitude, of the device that you are using. This changes frequently as the user moves around the Earth, and is reported to the app by the phone.
This is sometimes determined by the Global Positioning System (GPS) satellites, which are accurate to up to a few feet, but can also be reported by cellular towers, which is often accurate to a few kilometers. Additionally, this reported location may be 'old' or outdated, as the app can only use the location that the device reports. Often, devices will report locations determined a few minutes earlier as a means of saving battery life. At a large distance (ie. hundreds of kilometers from the Kabah), using slightly old or slightly innacurate location data has basically zero effect on the direction of the Qiblah.Reported Orientation of Device
The final factor, and the one that can cause the most confusion and error with regards to smartphone users, is the orientation of the device with regards to degrees East or West of North. This is determined by the geomagnetic field sensor built in to most smartphone devices, which is basically a digital compass. Unfortunately, like all compasses, it is effected by magnetic fields, nearby metal objects, etc. Any app running on a smartphone cannot do anything to effect the readings reported to the app by the phone's Operating System (OS). If the phone reports that the user is facing 10 degrees East of North, then the app must trust what the phone is reporting. The only way to improve the devices reporting is to do the sensor calibration techniques that are often reported on the device's screen (ie. waving the phone in a certain direction, like iOS sometimes asks users to do).What this means
What all the above means when it comes to using your smartphone to determine the Qiblah direction is that you have to use common sense and use the app as a guide rather than the final absolute truth. If your phone is telling you that the Qiblah is a certain direction, then see if it matches up with your knowledge of the area, the position of the sun, and your previous experience. If you are in the Haram, then put your phone away. The device's location being reported slightly innacurately or a few minutes late will have a huge effect on the calculated direction. An analogy to this would be standing in the first row of salah, next to the Kabah, then asking someone next to you which way the Kabah was. That person would point forward and be 100% accurate. If you then immediately moved 30 feet to the East, and then used the direction that you asked for earlier, you would definitely be praying in the wrong direction. The small movement of 30 feet leads to a huge error in direction when so close to the Kabah. Likewise, looking at an app that is using a location that was determined just a few minutes earlier, and using an approximation of your location based on satellites or network towers can be highly innacurate because of your proximity to the Kabah.
If you are using your smartphone at a great distance from the Kabah, then the device's location being slightly inaccurate will not be the cause of a large error in the Qiblah direction. However, you must still be vigilant because of the error caused by the device's geomagnetic field sensor being effected by the current surroundings as described earlier.
Finally, one must realize that at great distances, a one or two degree difference in direction is basically imperceptible to someone who is determining the direction that their feet are pointing when praying. Yet according to the mathematical formula used to determine the Qiblah, a one or two degree change in direction could potentially cause you to technically be facing a different *city* (rather than Makkah al-Mukarramah) all together. Therefore, use your best judgement, the previously established Qiblah in the area, and importantly, the advice of a qualified local scholar if you have any doubts with regards to the Qiblah direction.