Detailed Android positioning

Source: Internet
Author: User

Believe that a lot of friends have in the app to achieve the needs of positioning, today I once again ultra-rehash, for you to present the domestic developers commonly used to three kinds of positioning methods. They are GPs, Baidu and gold, the practice of the first simple introduction to the background of positioning.

What is GPS positioning, base station positioning, and Wi-Fi positioning?

1, GPS positioning: According to the device GPS chip and GPS satellite to achieve positioning, GPS positioning in the room is not available. GPS positioning accuracy and the chip itself and the actual use of the environment, under normal circumstances, GPS positioning accuracy around 10m.

2, Base station positioning: According to the equipment to obtain the base station information to achieve positioning, base station positioning accuracy is generally unaffected by the use of the environment, mainly related to the base station coverage radius. Base Station location Service accuracy is currently around 200m.

3, Wi-Fi location: According to the device to obtain the Wi-Fi information to locate, Wi-Fi positioning accuracy is generally unaffected by the use of the environment, mainly and Wi-Fi radius, density. Wi-Fi positioning accuracy is currently around 20m.

At present, smartphones are built-in GPS chip, the corresponding mobile phone system manufacturers have also opened the external GPS interface. However, due to the influence of GPs by external factors, the general app is also indoor use, so it seriously affected the number of GPs search stars. But previously in the outsourcing company took over such a project, mainly for outdoor riding enthusiasts to use, to meet their riding route of the drawing. In the face of such a demand, GPS positioning is the most reliable choice, but the power consumption is not hurt.

So generally more reliable way, is the use of Baidu high-German enterprises for developers to provide a mature solution, you can choose a hybrid positioning method to deal with the actual use of complex applications. Hybrid positioning is to use the above three positioning technology, choose the best way to get the current location. Here's a brief introduction to the simple practices that we bring to you today.

First, GPS positioning

No special business needs, please use GPS positioning, choose Network_provider is a good choice. In addition, we have not noticed that the GPS can get the current time, in the acquisition of accurate time is a good choice.

2, Baidu positioning

Baidu positioning location contains a lot of information, enough to meet the needs of our work. Baidu positioning jar Package size 180Kb, relatively speaking is acceptable. Baidu's three positioning strategies are precisely corresponding to the above-mentioned background of our three positioning technology.

Third, the German positioning

The location of the position callback is also rich, and depends on the size of the packet 140kb, generally I work in the position is to use the gold.

Note: Through the Android system Locationmanager to locate is also full of reliable, outdoor demand using GPS provider, indoor use of network provider, positioning longitude and efficiency is also acceptable, and do not rely on third-party packages, Does not increase the volume of the program. But in many business situations, we want more than simple latitude and longitude information, we also need city, zip code, specific location and other information.

Code Address: Https://github.com/JackCho/LocationDemo

If you find it helpful, you are welcome to subscribe to my public account-Android dry Sharing (Id:android_share). Below is the QR code, to provide you with timely high-quality Android dry.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.