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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:48:53+00:00 2026-05-25T19:48:53+00:00

I have a service that does database calls. The service receives a request with

  • 0

I have a service that does database calls. The service receives a request with an intent, and when the database call is complete, it broadcasts an “update complete” intent indicating the completion of the call.

Sometimes the database is already populated with cached data, in which case I would like to immediately broadcast an “update complete” intent, indicating the activity should display the cached data, and then once the database has been updated fire another “update complete” intent indicating the activity should load the updated data.

The problem is that the second broadcast is never received by the activity. Is this because I’m re-using the same intent object that has already been fired?

Here’s the code:

if (scheduleDatabase.populated()) {
    intent.putExtra("fromCache", true);
    getApplicationContext().sendBroadcast(intent);
}

scheduleDatabase.update();
intent.putExtra("fromCache", false);
getApplicationContext().sendBroadcast(intent);

An update:
If I comment out one of the intent broadcasts, the other one always fires and is received.
Also, if I create two intent objects with the same action string and fire them separately, only the first one is ever received by the activity. I’m not clear yet on whether the other gets fired but not received, or if it never fires at all.

  • 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-25T19:48:54+00:00Added an answer on May 25, 2026 at 7:48 pm

    It turns out that the problems I had with the intents were a symptom of a larger problem in a different area of my code. After fixing that problem, the intents began firing and receiving as I expected. So, to answer my own original question, yes it is possible to fire a single intent multiple times.

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

Sidebar

Related Questions

I have code that does a web-service request. While doing this request I need
I have a program that does the following: Call webservice (there are many calls
I have a windows service that generates logs as it does some execution. I
I have a web service (ASMX) and in it, a web method that does
Does anyone know, or better yet have an example, of a WCF service that
Does a WCF service on SharePoint require that Anonymous Access is enabled? We have
I have a service that sometimes calls a batch file. The batch file takes
Right now we have a dll file that contains all the database calls and
We have a web service coded in C# that makes many calls to MS
I have a WCF service that occasionally causes a database deadlock. My service allows

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.