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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:20:00+00:00 2026-05-31T05:20:00+00:00

My Android app uses its Application class (to be precise its Application subclass) to

  • 0

My Android app uses its Application class (to be precise its Application subclass) to run a thread to retrieve data from a website. Once it does it successfully it is supposed to give this data to the running Activity (there are 2 activities in my app). How could I notify the Activity about this? How can I tell the current Activity that there is new available data that should be retrieved and presented?
Thanks for your answers.

  • 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-31T05:20:01+00:00Added an answer on May 31, 2026 at 5:20 am

    What about using a broadcast system.

    You can get the context in the Application class by using getApplicationContext();
    Then you can send your own custom broadcast:

    Intent i = new Intent();
    i.setAction("your.package.customintent.TEST");
    context.sendBroadcast(i);
    

    Then you can implement broadcast receiver in your activity’s to receive the broadcast.
    More info here: http://thinkandroid.wordpress.com/2010/02/02/custom-intents-and-broadcasting-with-receivers/

    You can set the data that you want to send in the Intent by using putExtra.
    But you can also store it in a database and by using the broadcasts you let the activity know that there is new data available

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

Sidebar

Related Questions

I've got an Android app that uses both drawables from its own resources folder
My app uses the android.support.v4.view.ViewPager class. For each page in the ViewPager, I want
Hi I've an android app which uses an XML file to render its User
My bitmap editor app uses the SD card to store application data where e.g.
My Android app, which uses a TabActivity to display its contents, has 4 tabs
I have a service class in my Android app which uses a timer. The
I have created an App Widget for Android 1.5. It uses a TextView to
I am writing an android app. I want to pass some data across the
I have an application published in the Android Market. Its target is 1.6 and
I'm trying to install my apk (which uses google maps) in android device. Its

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.