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

  • Home
  • SEARCH
  • 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 4035614
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:07:13+00:00 2026-05-20T12:07:13+00:00

Is it advisable to implement both LocationManager.NETWORK_PROVIDER and LocationManager.GPS_PROVIDER with the differenct listener and

  • 0

Is it advisable to implement both LocationManager.NETWORK_PROVIDER and LocationManager.GPS_PROVIDER with the differenct listener and then unregister the listeners locationManager.removeUpdates(locationListener) ?

Because GPS_PROVIDER takes lot of time to return the values and sometimes doesn’t even gives a call back?

Also, we can have a locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); in handler with a postDelayed to avoid a deadlock in case there aren’t any callbacks?

Any help by anyone?

Thanks in advance!!!

BR,
J

  • 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-20T12:07:14+00:00Added an answer on May 20, 2026 at 12:07 pm

    Hm afaik locationManager.getLastKnownLocation returns instantly, so you should not see any deadlocks?

    If you really need to manage your own LocationListeners, it is advisable to first register a Network-One and a two GPS-ones. Use the network-Listener to receive a first location (rough). Configure one GPS-Location-listener to receive all GPS-Updates. Once the location is accurate neough, switch to a managed GPS-Location-Listener, that only receives updates every x seconds and x meters diff. See http://developer.android.com/guide/topics/location/obtaining-user-location.html for more examples.

    If you want to display the location on a map, try MyLocationOverlay. It does all that for you.

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

Sidebar

Related Questions

It is advisable to use tables in HTML pages (now that we have CSS)?
Is it advisable to use arrays in Javascript using tens of thousands of indexes?
Why is it not advisable to use JavaScript in JSP? One rationale that I
I'm just learning Perl. When is it advisable to use OO Perl instead of
Is it advisable or even possible to design a restaurant system using php? The
Is it advisable to have business logic in a finally block? I have to
JQuery timer : is it advisable to use it? or is it better to
I know it's often advisable to use the @property accessors, and I know it's
In a Scrum or Agile team is it advisable for a Product Owner to
For an application I need to have an unsigned data-type with 24 bits. Unfortunately

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.