Specific explanations for Android targeting

Source: Internet
Author: User

Believe that a lot of friends have in the app to achieve the needs of positioning, today I again super-rehash, for you to present the domestic developers often use three kinds of positioning methods. They are GPs, Baidu and gold, the practice of first introduction under 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 able to use. GPS positioning accuracy and the chip itself and the actual use of the environment, under normal circumstances. GPS positioning accuracy is around 10m.

2, Base station positioning: According to the equipment obtained base station information to achieve positioning, base station positioning accuracy is generally unaffected by the use of the environment. Mainly related to the coverage radius of the base station.

Base Station location Service accuracy is now 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 now around 20m.

Now smartphones are built-in GPS chips, and the corresponding handset system manufacturers have also opened the external GPS interface. But because GPS is affected by external factors is relatively large. The General app is also indoor use, so it seriously affected the number of GPs search stars. Just once in the outsourcing company took over such a project, mainly for outdoor riding enthusiasts to use, to meet their riding route drawing. Faced with such a demand. GPS positioning is the most reliable choice, but could not afford to hurt the electricity ah.

So the generally more reliable way, is to use the Baidu high-German enterprises for developers to provide a mature solution, can choose a hybrid positioning method to deal with the complex practical use of the app. Hybrid positioning is to use the above three positioning technology, choose the best way to get the current location. To come down and introduce the simple practice we bring to you today.

First, GPS positioning

No special business requirements. Please use GPS positioning with caution, choose Network_provider is a good choice. Other than that. Has anyone noticed that it is a good choice to get the current time through GPS and not get the exact time.

2, Baidu positioning

Baidu's location includes a lot of information. Enough to meet the needs of our work.

Baidu positioning jar Package size 180Kb, relatively speaking, can be accepted.

Baidu's three positioning strategy is exactly the corresponding above our background introduction of the three positioning technology.

Third, the German positioning

The location information of the German positioning callback is also richer and depends on the packet size of 140kb. In general, I work in the position is to use the German.

Note: The Locationmanager of the Android system 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. The volume of the program is not added.

But in very many business situations. We want more than simple latitude and longitude information, we also need city, zip code, detailed location and other information.

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

If you think it's helpful, you're welcome to subscribe to my public account-Android dry Sharing (Id:android_share).

The following is the QR code, to provide you with timely high-quality Android dry. Technical Exchange QQ Group: 318588906, welcome everyone to add a group, together to explore the next Android and Java technology, together to expand our dry sharing community.

Specific explanations for Android targeting

Related Article

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.