Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3287906
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:32:48+00:00 2026-05-17T20:32:48+00:00

I’m developing a mapping app using Eclipse 3.5. I’m setting the minimum update period

  • 0

I’m developing a mapping app using Eclipse 3.5.

I’m setting the minimum update period with the LocationManager’s requestLocationUpdates method, via a configuration activity. When I set the property I see in Logcat that the system process sets the value OK.

When I actually send a new location from the DDMS emulator control and the location changes on the map view, I see that the system process then sets the minimum time to zero.

Below is a capture of the system’s log messages. You can see that I’m setting the period to 32 seconds, then 16, then, after I’ve sent a simulated location change the system sets it to zero

The map responds to location changes to location changes instantly even if they are sent only a couple of seconds apart.

Does anyone know why my minimum time is overridden by the system?

10-26 22:21:09.770: DEBUG/GpsLocationProvider(54): setMinTime 32000
10-26 22:21:53.011: DEBUG/GpsLocationProvider(54): stopNavigating
10-26 22:21:57.810: DEBUG/GpsLocationProvider(54): setMinTime 16000
10-26 22:21:57.810: DEBUG/GpsLocationProvider(54): startNavigating
10-26 22:21:57.900: DEBUG/GpsLocationProvider(54): setMinTime 16000
10-26 22:22:39.099: DEBUG/GpsLocationProvider(54): TTFF: 41290
10-26 22:22:39.350: DEBUG/GpsLocationProvider(54): setMinTime 0
10-26 22:22:51.740: DEBUG/GpsLocationProvider(54): TTFF: 53925
10-26 22:22:51.820: DEBUG/GpsLocationProvider(54): setMinTime 0
10-26 22:22:56.780: DEBUG/GpsLocationProvider(54): TTFF: 58967
10-26 22:22:56.879: DEBUG/GpsLocationProvider(54): setMinTime 0

pertinent code, below, enableGPS() called in onResume()

    private void enableGPS() {

    if (confData.getTrackMode() == AppConstants.GPS_ON) {
        if (lm == null)
            lm = (LocationManager) getSystemService(LOCATION_SERVICE);
        long updateMillis = confData.getMapUpdatePeriod() * 1000;
        lm.requestLocationUpdates(LocationManager.GPS_PROVIDER,
                updateMillis, confData.getMapMinResendDistance(), this);
    }

}

and listener is

    public void onLocationChanged(Location location) {

    List<Overlay> overlays = mv.getOverlays();
    lo = new MyLocationOverlay(this, mv);
    overlays.add(lo);
    lo.enableMyLocation();
    int lat = (int) (location.getLatitude() * 1E6);
    int lng = (int) (location.getLongitude() * 1E6);
    GeoPoint point = new GeoPoint(lat, lng);
    mc.setCenter(point);
    mv.invalidate();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T20:32:48+00:00Added an answer on May 17, 2026 at 8:32 pm

    First, android GPS use with emulator is really full of bugs, I try all aps with a real phone if it involves using GPS when I get inconsistent behaiviour.

    Taken from the Android Reference:

    public void requestLocationUpdates (String provider, long minTime, float minDistance, PendingIntent intent)

    minTime the minimum time interval for notifications, in milliseconds. This field is only used as a hint to conserve power, and actual time between location updates may be greater or lesser than this value.

    Edit, i saw this in your code:

    long updateMillis = confData.getMapUpdatePeriod() * 1000;
    

    Im guessing this is just something that returns a constant? Or is it an android method? why not just set it at 60000 or soemthing like that manually?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.