Saturday, May 29, 2010

Re: [android-developers] Problem with threading....

Robin van Leeuwen wrote:
> In the code showed as below i create a process dialog for doing some
> long operation (in this case waiting
> 4 seconds)... It runs as it should. And shows the "Starting..." and
> "Done" message but when it finishes
> and i click Button1 again it terminates. What am i doing wrong?

If by "it terminates" you mean you get an exception, use adb logcat,
DDMS, or the DDMS perspective in Eclipse to examine the Java stack trace
and learn where you crashed.

Most likely, you are getting an IllegalThreadStateException, because you
cannot reuse a Thread object.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.0 Available!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment