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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:18:15+00:00 2026-05-23T19:18:15+00:00

I plan to program an Android app that periodically determines the device’s position (say

  • 0

I plan to program an Android app that periodically determines the device’s position (say every five minutes) and uploads position data to the internet. The tracking shall be explicitly activated and deactivated by the user and shall go on when the user leaves the application (activity) or the device switches to standby. The upload of position data to the internet does not have to be realtime, but should happen soon.

I already read the Android Dev Guide about services and obtaining user location as well as some howtos about creating a service. As far as I got it, I should implement a (foreground-)service to get the location and temporarily save it somewhere. Another service would care about uploading the data.

But there are still a lot of things I’m not shure about: Should I use a thread and a loop with a timer? Or an IntentService and then trigger an Intent every 5 minutes (how, where)? Or use AlarmManager? And how can I trigger the upload of the position data?

I am fairly new to all this (I only created some desktop Java programs yet), and I would be very happy if someone gave me an idea how to implement this in Android.

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-23T19:18:16+00:00Added an answer on May 23, 2026 at 7:18 pm

    You should set an Alarm via Alarm Manager to start the service. The service then should look for location, and send it to the final destination.

    I would also implement a second thread in the service that pauses for a time (say 15 seconds) and terminates the service. Otherwise if no location can be found for some reason, you will destroy the devices batteries by continuously looking.

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

Sidebar

Related Questions

I have over 300 questions/prompts that I plan to include in the program. The
The Plan: I'm developing an android application that is heavily database driven (as in,
I've been wanting to program for the Plan 9 operating system for a while.
I plan to be storing all my config settings in my application's app.config section
I plan to develop a nice little application that will run on an arm-based
I have an app that is a little bit slow. I thoutght it could
Trying to generate an explain plan in SQL Developer, the program puts up a
I have a .NET program and a Borland Win32 program that need to pass
I'm building a program that has several functions that need to read data from
I have a Java program and PHP website I plan to run on my

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.