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 720905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:48:43+00:00 2026-05-14T05:48:43+00:00

Is there any way to specify the time intervals that the Location Manager broadcasts

  • 0

Is there any way to specify the time intervals that the Location Manager broadcasts the current location?

I am using a method called startListening:

public void startListening() {
        locationManager.requestLocationUpdates(
                LocationManager.GPS_PROVIDER, 
                0, 
                0, 
                this
        );
}

Thanks

  • 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-14T05:48:43+00:00Added an answer on May 14, 2026 at 5:48 am

    public void requestLocationUpdates (String provider, long minTime, float minDistance, LocationListener listener, Looper looper)

    Registers the current activity to be notified periodically by the named provider. Periodically, the supplied LocationListener will be called with the current Location or with status updates.

    It may take a while to receive the most recent location. If an immediate location is required, applications may use the getLastKnownLocation(String) method.

    In case the provider is disabled by the user, updates will stop, and the onProviderDisabled(String) method will be called. As soon as the provider is enabled again, the onProviderEnabled(String) method will be called and location updates will start again.

    The frequency of notification may be controlled using the minTime and minDistance parameters. If minTime is greater than 0, the LocationManager could potentially rest for minTime milliseconds between location updates to conserve power. If minDistance is greater than 0, a location will only be broadcasted if the device moves by minDistance meters. To obtain notifications as frequently as possible, set both parameters to 0.

    Background services should be careful about setting a sufficiently high minTime so that the device doesn’t consume too much power by keeping the GPS or wireless radios on all the time. In particular, values under 60000ms are not recommended.

    The supplied Looper is used to implement the callback mechanism.

    Parameters

    • provider the name of the provider
      with which to register
    • 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.
    • minDistance the minimum distance
      interval for notifications, in meters
    • listener a whose onLocationChanged(Location)
      method will be called for each
      location update
    • looper a Looper
      object whose message queue will be
      used to implement the callback
      mechanism.

    Throws

    IllegalArgumentException if provider is null or doesn’t exist
    IllegalArgumentException if listener is null
    IllegalArgumentException if looper is null
    SecurityException if no suitable permission is present for the provider.

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

Sidebar

Related Questions

Is there any way to specify that a function should be called when a
Is there any way that you can specify in Fluent NHibernate to leave out
Is there any way to specify a width when doing :vsplit? Also, is there
Is there any way to specify optional parameters (such as when search parameters are
Is there any way I can specify a standard or custom numeric format string
Is there a way to specify which namespace includes should be automatically added any
Any style for input affects every input element. Is there a way to specify
Is there any way to check whether a file is locked without using a
Is there any way to capture the MouseDown even from the .NET 2.0 TextBox
Is there any way to apply an attribute to a model file in ASP.NET

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.