View not attached to window manager

by PaulJ » Tue, 23 Nov 2010 14:54:21 GMT

Sponsored Links

I'd like to ask about how to proper handle progressDialog in
Thread, since getting the error from subject.

My code:

Thread logThread = new Thread()
String result = new String();

public void run()

result = ofsomesomeoperation();
catch (NoSuchAlgorithmException e)

} Runnable()
public void run()
if (result.equals(something1))
Intent newint = new Intent(Example.this,NewInt.class);

Problem occurs when a dialog progress appears and I change my phone
orientation, it freezes and crashes, on line with dismiss(). I've seen
discussion about this but my English is poor, so I hope for some
examples on my code. Thank you.



Re: View not attached to window manager

by TreKing » Wed, 24 Nov 2010 07:08:37 GMT


For starters, if you use showDialog(), use dismissDialog() instead of
calling dismiss on the dialog directly.

TreKing <> ; - Chicago
transit tracking app for Android-powered devices


Sponsored Links

Other Threads

1. Random Crash in App

Hello, im developing a SMS unlocker. Its an app that lets you run a
game as a demo and give the option of unlocking it via sms messaging.
The problem is that im having a chash that occurs unexpectedly and i
suspect that it can be because of the way that im managing the flow
Instead of using different activities for the different interfaces,
and switch between activities each time the user choose an option, I
use just one activity and i set
different layouts.

e.g. main menu -> unlock game, play demo, help, about. If the user
chooses about, a new activity is not created, intead of that i set an
about_layout to
the activity that was already running.
When the user (in about section) chooses back option, i set the
main_menu_layout again.

Im having this problem in the emulator as well as in the phone (HTC
G1 (dream))

What I want to know is if the phone (or emulator) is having any
problem by setting different layouts at any time.

The exact error that Im getting is:
The application XXXX (process has stopped
unexpectedly. Please try again.


2. Errors while building a Standalone tool chain.

Hello Everybody,

I got the answer for my Question.

The Solution is *bash ./build/tools/ --build-out=
(path to <ANDROID_PRODUCT_OUT>**)*

The PATH for ANDROID_PRODUCT_OUT has to be set correctly..!



3. Google Map API limitations for Android

4. Cannot see my HTC Magic via DDMS to take screenshot

5. Inserting large volumes of data into SQLite - speed issues

6. Remote services question

7. How to draw a circle in GL?