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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:24:54+00:00 2026-05-23T02:24:54+00:00

I have a broadcast receiver that I try to unregister in the OnPause() method.

  • 0

I have a broadcast receiver that I try to unregister in the OnPause() method. But then it gets blocked it seems, and although I register it in the OnResume(), it doesn’t fire. If I only register it it works well, but then I get the exception “leaking broadcast receiver, you should unregister it”, as below:

06-04 22:50:04.267: ERROR/ActivityThread(4188): Activity com.example.android.CView has leaked IntentReceiver com.example.android.CView$1@4062b650 that was originally registered here. Are you missing a call to unregisterReceiver()?
06-04 22:50:04.267: ERROR/ActivityThread(4188): android.app.IntentReceiverLeaked: Activity com.example.android.CView has leaked IntentReceiver com.example.android.CVieww$1@4062b650 that was originally registered here. Are you missing a call to unregisterReceiver()?
06-04 22:50:04.267: ERROR/ActivityThread(4188):     at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:790)
06-04 22:50:04.267: ERROR/ActivityThread(4188):     at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:575)
06-04 22:50:04.267: ERROR/ActivityThread(4188):     at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:848)
06-04 22:50:04.267: ERROR/ActivityThread(4188):     at android.app.ContextImpl.registerReceiver(ContextImpl.java:835)
06-04 22:50:04.267: ERROR/ActivityThread(4188):     at android.app.ContextImpl.registerReceiver(ContextImpl.java:829)
06-04 22:50:04.267: ERROR/ActivityThread(4188):     at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:318)
06-04 22:50:04.267: ERROR/ActivityThread(4188):     at cActivity com.example.android.BehaviourView.onStart(BehaviourView.java:230)
06-04 22:50:04.267: ERROR/ActivityThread(4188):     at 

There are tons of posts concerning this, and I have tried many of them without results. The practice is to register it in OnResume and unregister it in the OnPause, right? Or should I unregister it in onStop(). I have tried and then it never listens.

Thanks for any pointers!

  • 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-23T02:24:54+00:00Added an answer on May 23, 2026 at 2:24 am

    The practice is to register it in OnResume and unregister it in the OnPause, right?

    Yes. Here is a sample application demonstrating this.

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

Sidebar

Related Questions

i have code that calls a broadcast receiver, in the receiver, i try to
I have a broadcast receiver that listens for incoming calls, then displays a popup.
I have a BroadcastReceiver that can successfully catch a broadcast, but if I try
Hello I faced the same problem I have 1 broadcast receiver from that I
So I have a broadcast receiver that needs to notify a service that it
I was just wondering if it is possible to register a broadcast receiver that
In my app I have a broadcast receiver that turns on GPS upon receiving
I have a broadcast receiver which I want to pass onto an activity but
I have a broadcast receiver that listens to incoming calls. And I want to
I have an AlarmManager that notifies a broadcast receiver and the broadcast receiver plays

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.