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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:14:03+00:00 2026-05-15T03:14:03+00:00

I’m writing my first location based android app, but got confused about some of

  • 0

I’m writing my first location based android app, but got confused about some of the GPS service api. Here are some questions I have:

1) To get my current location, I called requestLocationUpdates() with a listener in the onCreate() method of one activity. But what happens when another activity starts and the current activity goes invisible? Is the GPS location update going to stop? If so, how do I keep it on after the activity is switched?

2) how accurate is the Location.getSpeed()? How is it computed? Can it tell the difference between on bicycle and on foot?

3) not really a question about android. How to calculate the coordinates of a location, say, 100m away from my current location?

4) To stop the GPS, I only need to remove all the listeners that have been registered to locationmanager?

Thanks a lot!

  • 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-15T03:14:03+00:00Added an answer on May 15, 2026 at 3:14 am

    This will not be an exhaustive answer, as I don’t have any experience with Android development, but I just wanted to add my thoughts on your GPS questions:

    Question 2: Normally speed is calculated in the GPS hardware, simply by dividing the change in distance over the change in time.(See comments below) Speed is usually reasonably accurate as long as there is GPS coverage, and you should definitely be able to tell if someone is on foot or on bicycle. You should even be able to tell between normal walking (6 km/h) and slow jogging (12 km/h).

    Question 3: There is an infinite number of locations at 100m from the current location. Only if you add a bearing, you would be able to derive a destination point. The formula is the following (Source):

    lat2 = asin(sin(lat1)*cos(d/R) + cos(lat1)*sin(d/R)*cos(θ))
    lon2 = lon1 + atan2(sin(θ)*sin(d/R)*cos(lat1), cos(d/R)−sin(lat1)*sin(lat2))

    d/R is the angular distance (in radians), where d is the distance travelled and R is the earth’s radius

    You may want to check out the following Stack Overflow post for a JavaScript implementation of the above, which I think should not be difficult to port:

    • How to calculate the latlng of a point a certain distance away from another?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.