Implementation of the Android Findmyphone function module

Source: Internet
Author: User

Similar to iphone "Find My iphone" above

1. Mobile Location

Need to take into account domestic and foreign, the domestic use of Baidu maps, foreign use of Google Maps, two maps, belong to different coordinate systems.

Mobile phone this way to avoid the problem of different coordinate system, the direct use of international standards (WGS84), namely: through the mobile phone equipment GPS and network networks two positioning methods to obtain latitude and longitude.

Different coordinate system transformation problem, to the server hurt the mind, users have to provide methods: http://blog.csdn.net/ma969070578/article/details/41013547

According to Baidu positioning SDK related documents know, it positioning the way to take into account GPS, WiFi and base station, the scheme is more mature, perfect and accurate.

The base station location is achieved by obtaining information about the three base stations around it (the Lac CID of the base station, signal strength, etc.) and calculating which point the mobile device is located in the triangle. Too complicated for the time being to consider this way of implementation.

Of course, you can directly use Baidu's SDK to complete the positioning function, but was excluded, because Baidu positioning to give the coordinate values belong to Baidu's own coordinate system. Later, when considering the use of different map displays, it is necessary to consider the conversion problem between the various coordinate systems.

Although there are online users to provide conversion tools between the various coordinate systems, but other information that the various coordinate system of the migration algorithm is confidential, it is doubtful about the accuracy of this tool class. Also a simple test, there is error, but the error is not small.

Through the Baidu Positioning SDK, temporarily no longer consider the scope.

2. Regular upload of the phone's latitude and longitude

Set up a timer, ready to be implemented with Alarmmanager. Time frequency plan three minutes.

3. Push through Baidu to accept instructions from the server

Baidu pushes the SDK integration into the project, you can complete the user on the Server Web page to send the operation instructions to the phone.

4. Determine whether the latitude and longitude is abroad

Online has a netizen, very good gives the plan: http://www.cnblogs.com/Aimeast/archive/2012/08/09/2629614.html

Think the second is better, of course, this step of the judgment is performed on the server.

There is another way: through the anti-geocoding function provided by Baidu, which can get the value of country, determine whether = = China

5. Ensure that the background is always in a running state

Monitor the power on and network status changes broadcast, when receiving these two broadcasts, call the method of starting service, has ensured that the service has been in the start state

Prevents users from manually shutting down the service in settings, and plans to ask colleagues in the System group to help hide it. Not sure if you can do it.

6. Handling instructions from the server

Instructions are sent from the server's push.

Set up specific actions based on the early agreed-upon directive identification

Where the bells, you can implement, unlock, lock and erase all the data, you need the help of colleagues in the System group.

Implementation of the Android Findmyphone function module

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.