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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:18:59+00:00 2026-05-27T00:18:59+00:00

I was working with background threads and orientation changes. i have gone through the

  • 0

I was working with background threads and orientation changes. i have gone through the code given here.
https://stackoverflow.com/q/1512263 and some other posts too.

i’m using “android:configChanges=”keyboardHidden|orientation” for handling screen orientation changes. it works fine but when i want to finish this activity it gets forced close with a runtime exception with a message “Unable to destroy activity..”
any idea to finish my activity safely?

Log output is:

11-23 12:47:32.025: E/AndroidRuntime(438): Uncaught handler: thread main exiting due to uncaught exception
11-23 12:47:32.125: E/AndroidRuntime(438): java.lang.RuntimeException: Unable to destroy activity {com.FileBrowser/com.FileBrowser.mainScreenwithtab}: java.lang.IllegalArgumentException: Receiver not registered: com.FileBrowser.ScrollableTabActivity$ChangeTabBroadcastReceiver@44df87d8
11-23 12:47:32.125: E/AndroidRuntime(438):  at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3469)
11-23 12:47:32.125: E/AndroidRuntime(438):  at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3487)
11-23 12:47:32.125: E/AndroidRuntime(438):  at android.app.ActivityThread.access$2800(ActivityThread.java:119)
11-23 12:47:32.125: E/AndroidRuntime(438):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1896)
11-23 12:47:32.125: E/AndroidRuntime(438):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-23 12:47:32.125: E/AndroidRuntime(438):  at android.os.Looper.loop(Looper.java:123)
11-23 12:47:32.125: E/AndroidRuntime(438):  at android.app.ActivityThread.main(ActivityThread.java:4363)
11-23 12:47:32.125: E/AndroidRuntime(438):  at java.lang.reflect.Method.invokeNative(Native Method)
11-23 12:47:32.125: E/AndroidRuntime(438):  at java.lang.reflect.Method.invoke(Method.java:521)
11-23 12:47:32.125: E/AndroidRuntime(438):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
11-23 12:47:32.125: E/AndroidRuntime(438):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
11-23 12:47:32.125: E/AndroidRuntime(438):  at dalvik.system.NativeStart.main(Native Method)
11-23 12:47:32.125: E/AndroidRuntime(438): Caused by: java.lang.IllegalArgumentException: Receiver not registered: com.FileBrowser.ScrollableTabActivity$ChangeTabBroadcastReceiver@44df87d8
11-23 12:47:32.125: E/AndroidRuntime(438):  at android.app.ActivityThread$PackageInfo.forgetReceiverDispatcher(ActivityThread.java:667)
11-23 12:47:32.125: E/AndroidRuntime(438):  at android.app.ApplicationContext.unregisterReceiver(ApplicationContext.java:747)
11-23 12:47:32.125: E/AndroidRuntime(438):  at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:321)
11-23 12:47:32.125: E/AndroidRuntime(438):  at com.FileBrowser.ScrollableTabActivity.onDestroy(ScrollableTabActivity.java:120)
11-23 12:47:32.125: E/AndroidRuntime(438):  at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3456)
11-23 12:47:32.125: E/AndroidRuntime(438):  ... 11 more
  • 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-27T00:19:00+00:00Added an answer on May 27, 2026 at 12:19 am

    You shouldn’t really use the technique you’re using. I’ve written two blogposts about this:

    Actvity and background threads (part 1)
    Actvity and background threads (part 2)

    But since fragments were introduced, there is much easier way of handling background threads now: so called retained fragments (see an example here).

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

Sidebar

Related Questions

Background: We have an offshore group working up a Silverlight 2 prototype for us.
What is the proper way to manage threads working in the background? For example,
i'm working with a multi-threaded program (using pthreads) that currently create a background thread
Background: working a user q&a site where users logged,etc. What user/visitor data should be
I am working on a background program that will be running for a long
Background I am working on a legacy small-business automation system (inventory, sales, procurement, etc.)
Background I am working on a phonetic converter program which converts english text into
Some background I'm currently working on a mobile site so I keep switching user
Background: Trevor was working on a test project solely for the purpose of trying
First some background: I'm working on an application and I'm trying to follow MVVM

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.