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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:32:20+00:00 2026-06-05T02:32:20+00:00

I am developing an app that uses the gps which runs until app is

  • 0

I am developing an app that uses the gps which runs until app is in service. My GPS wakes up after 5 mins and gets the location then its symbol stops blinking and becomes invisible in almost all devices (Sony xperia, Samsung tab, Htc WildFire, Motorola photon) but not in Motorola Defy and Samsung Ace, which consume huge battery power. GPS gets a fix and becomes stable and visible the whole time. The way the GPS of these devices work (Moto Defy and Samsung Ace) is different. Look at my code:

long _listenerWakeUpTimeInterval=1000*60*5;**  //5 minutes
_locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, _listenerWakeUpTimeInterval, 300, locationListener);

The GPS of all devices wake up after 5 minutes but the GPS of these two devices (Moto Defy and Samsung Ace) calls the onLocationChanged(Location loc) method every 300 meters. The time matters not for these two devices. When I travel fast (in a car) this distance is covered in a few minutes (1 or 2 minutes). So I get a call on onLocationChanged(Location loc) method. And in these devices the GPS is always fixed, static and visible. I don’t want to call locationManager.removesupdates methods every time when the GPS gets a fix. I only cal this method in onDestroy() of service. So please tell why the GPS of these two devices behaves differently from other devices, and how to solve this problem ?

  • 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-06-05T02:32:22+00:00Added an answer on June 5, 2026 at 2:32 am

    I got the solution of this problem.I use AlarmManager(repeating alarm after each 5 minutes) to register gps and then I run my Gps for 30 seconds and unregister Gps .If I got call in onLocationChanged(Location loc) then I unregister Gps in this method.otherwise(If i don’t get new location) I unregister Gps through handler after 30 seconds.When I need Gps again I follow the same process.By this way my Gps works max 30 seconds not for whole the time until service run.

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

Sidebar

Related Questions

I'm currently developing an app which uses GPS location on googleMaps view. I check
I'm on developing iphone app that uses backend web service(django). To login the web
I am developing an iphone app that uses a php web service for all
I am developing an app which uses gps. i need a high accuracy so
I'm developing a Core Data app that uses a model object called Location. The
I'm learning MVVM with the hope of developing an app that uses the phone's
I'm developing an Android app that uses Osmdroid to display the maps in offline
I've been developing an iPhone app that uses a UIToolbar (in the context of
I'm developing an app in Visual C++ that uses an SQLite3 DB for storing
I'm developing an app that uses iOS4 features (like MFMessageComposeViewController), but I want to

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.