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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:13:34+00:00 2026-05-23T09:13:34+00:00

I am developing in app where I am using an activity in which I’m

  • 0

I am developing in app where I am using an activity in which I’m displaying a list view items page by page by using threading, When the user selects the item it will take the user to another activity.

But Here some times when I click on list view item the app crashes. It says something in log cat but I am unable to understand it.

Here is the Stack Trace:

06-24 16:26:44.320: ERROR/AndroidRuntime(4248): FATAL EXCEPTION: main
06-24 16:26:44.320: ERROR/AndroidRuntime(4248): android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@4073ef78 is not valid; is your activity running?
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at android.view.ViewRoot.setView(ViewRoot.java:527)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at android.view.Window$LocalWindowManager.addView(Window.java:424)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at android.app.Dialog.show(Dialog.java:241)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at android.app.AlertDialog$Builder.show(AlertDialog.java:802)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at com.usablenet.mobile.walgreen.app.util.ErrorAlertServiceImp.showErrorAlert(ErrorAlertServiceImp.java:86)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at com.usablenet.mobile.walgreen.pharmacy.PrescriptionList.showErrorCodeAlert(PrescriptionList.java:360)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at com.usablenet.mobile.walgreen.pharmacy.PrescriptionList.access$300(PrescriptionList.java:45)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at com.usablenet.mobile.walgreen.pharmacy.PrescriptionList$2.handleMessage(PrescriptionList.java:323)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at android.os.Looper.loop(Looper.java:130)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at android.app.ActivityThread.main(ActivityThread.java:3683)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at java.lang.reflect.Method.invokeNative(Native Method)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at java.lang.reflect.Method.invoke(Method.java:507)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-24 16:26:44.320: ERROR/AndroidRuntime(4248):     at dalvik.system.NativeStart.main(Native Method)

Thanks,
Balu.

  • 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-23T09:13:35+00:00Added an answer on May 23, 2026 at 9:13 am

    Use getApplicationContext for the AlertDialog, otherwise you will get this error when you switch between tasks.
    Instead of: AlertDialog.Builder builder = new AlertDialog.Builder(this);
    Use:ConnectionDetector = new ConnectionDetector(getApplicationContext());
    The same goes for any listeners on the dialog.

    Furthermore:

    if (!ConnectionDetector.isConnectingToInternet()) {
    alert.showAlertDialog(ListActivity.this, "Internet Connection Error","Please connect to working Internet connection", false);
                // stop executing code by return
                return;
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a website. I'm using a single-page web-app style, so all of the
I'm developing an app using a fork of LeavesViewController that changes to a two-page
I'm developing an ASP.NET 2.0 app using Visual Studio 2008. If I want to
I am developing a forms app (not web) for Windows Mobile, using .NET CF
I'm using the RESTful authentication Rails plugin for an app I'm developing. I'm having
I'm using the data mapper pattern in a PHP app I'm developing and have
I'm using Windows Vista x64 with SP1, and I'm developing an ASP.NET app with
I am developing an app using Grails and GWT for a client side. I
This is no typical programming question. I am currently developing an app using the
I am developing a web app using the Joomla Framework. The jQuery UI accordion

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.