Location detection techniques used in mobile devices