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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:03:25+00:00 2026-05-23T04:03:25+00:00

I start an activity in my class Locator.java which starts a locacionListener Service. That

  • 0

I start an activity in my class Locator.java which starts a locacionListener Service. That activity writes positions to a database. I wonder if when i move to next screens(activities), positions will keep writing to the database, or I would need to go back to Locator.java to keep writting. The same when I minimize the application.

I have thouhgt about using a Service, but I want to be sure I need it.

Other scenary, imagine that I only need the position when I am in one activity. I wonder if in that case a service will improve the performance, as if the GPS module stops between activities, I would need to restart it next time I go back to the activity. I that case a service will keep the module active and next time I go back to the activity it will be quicker to get the position.

I really appreciate your help.

Thanks,
David.

  • 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-23T04:03:25+00:00Added an answer on May 23, 2026 at 4:03 am

    I have implementeed a service when I need to keep doing a task with the Location. But if I want to use the Location in one Activity I will use the tip from DynamicMind. Whereas to keep working with the Location Service when I am in others activities I need a service.

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

Sidebar

Related Questions

I have 4 buttons that when click starts a new activity class. This works
Actually I have two java classes of which one is an activity class. Now
In my activity class i call start service and service works fine.In the service
I want to start multiple instance of the same Activity class from a Service
When I run my code, Unable to start activity ComponentInfo: android.database.sqlite.SQLiteException: near /: syntax
I want to start an activity when the service is ran for the first
I know that we can start new activity with the steps as follows :
I'm trying to start an activity from a service running in background but its
My current activity class TimerAct.java makes use of a timer of 30secs. Upon the
In my activity class i want to perform a series of long calculations that

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.