Application can detect magnetic north through the use of sensors installed in your device. For a proper disclosure it is necessary to put it level, looking at the bubble that has to be in the center.