Mintime and mindistance parameters when Android calls the system GPS module

Source: Internet
Author: User

I was developing androidProgramWhen calling GPS, they all use functions directly.

Public void Requestlocationupdates (Long mintime, float mindistance, Criteria, pendingintent intent)

However, the customer recently said that the GPS of the mobile phone is not accurate enough, so he learned about the two parameters in the function signature from the Google developer website. If there is any inaccuracy, please correct them as follows ):

    • Mintime: the shortest time for the application to receive GPS updates (that is, only when this time limit is exceeded can the system notify our program to say "GPS"-unit: milliseconds
    • Mindistance: the shortest distance for the application to receive GPS updates (that is, the system can only notify our program to update GPS data)-In meters
Note 1: When both conditions are set (neither is 0), the application must be notified only when both conditions are met. . NOTE 2: Since the GPS module consumes a lot of power for a long time, we recommend that you set mintime to a longer value (especially the background thread) for all Android devices within the permitted range)

See the original article:

Http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates (long, float, Android. Location. Criteria, Android. App. pendingintent)

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.