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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:22:37+00:00 2026-05-26T16:22:37+00:00

I want to pass a parameter between two activities at a certain time interval.

  • 0

I want to pass a parameter between two activities at a certain time interval. The passed parameter is an int, that represents the number of satellites seen by the device and is used to draw a chart in the second activity.

  • 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-26T16:22:38+00:00Added an answer on May 26, 2026 at 4:22 pm

    It is very likely that you are trying to do something in a strange way because you do not fully understood yet how activities in Android are working.

    There is only one active Activity in your whole app. Sending data from one activity to another is only needed if the users changes the active Activity, either through clicking on a button and switching to a new Activity or through clicking back and going back to the previous Activity. Please read the Activity Lifecycle very carefully to understand how activities should be used.

    I assume that you have registered a location listener in one activity and try to use the values of this listener in other activities. Normally you would use the onPause method to deactivate the listener in the first activity and then activate a new one in the new activity. This will get you the number of known satellites in every activity. If the user goes back you will have to reregister the listener in the onResume method to reenable the gps updates for the new Activity.

    Keeping an active GPS Listener in a paused Activity will lead to an active GPS Sensor even if your App is in the background and not used anymore. This will drain the battery of the phone very fast and very likely have your app uninstalled in an instance.

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

Sidebar

Related Questions

I want to pass a varying number of parameters between two objects. I have
When using call_user_func_array() I want to pass a parameter by reference. How would I
I want to pass an enum value as command parameter in WPF, using something
I want to pass a byte[] to a method takes a IntPtr Parameter in
I want to pass a delegate with the return type as ArrayList as parameter
I want to pass an integer value to a form in .Net so that
I want to pass an int list (List) as a declarative property to a
I want to pass a C# object between win forms. At the moment, I
I have a collection class with an Equals method that I want to pass
Let's say that I'm writing a function to convert between temperature scales. I want

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.