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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:13:20+00:00 2026-05-29T22:13:20+00:00

Is it possible that BroadcastReceiver in an activity which have gone to background receiving

  • 0

Is it possible that BroadcastReceiver in an activity which have gone to background receiving broadcast? If not, what should I do?

EDIT:

Let me clarify what I really need.
I have a service that will receive data from bluetooth.
When it get data from blue-tooth device successfully, the service will broadcast.

And there are three cases of the activity.

  1. foreground

Popup a dialog and ask for user something
I think it can be simply done by register receiver in activity

  1. background

I just don’t know how to do this part.
If I register the receiver in application, notification is shown. After taking a look of the answers below, I think I can register in Application.

  1. sleep
    Wake up the device.

Thank You.

  • 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-29T22:13:20+00:00Added an answer on May 29, 2026 at 10:13 pm

    You probably don’t even want that. Activities are not designed to be used that way.

    You should use a service to handle it. Or start an Activity if it needs to have an UI.

    There two alternatives the way I see it.

    1. Have a service running and register the receiver there instead.
    2. If possible you can register the broadcast receiver in the manifest instead and handle it there.
      Please keep in mind that the receiver will run on the main thread, so you should signal to a running service or start a service or activity here. Perhaps a service that performs a single task.

    A service that performs a single task can easily be implemented using IntentService. It is kind of like an async task wrapped in a service.

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

Sidebar

Related Questions

It is quite possible that I may not have got the point, but I
It's possible that I'm not really understanding how git works here, but I have
It's possible that I'm not really understanding how git works here, but I have
Is it possible that when you have a webpage, when you open the PDF,
How is this possible that the str_replace() function below returns biWeekly and not Every
I have an Android application with a main activity that is the tabhost. I'm
background: i've noticed that for regular activities within, it is possible for any application
Is it possible to register a global broadcast receiver that gets notified every time
I was just wondering if it is possible to register a broadcast receiver that
Is it not possible that foreign key(single column) in a child table references to

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.