[android-developers] Re: ProgressDialog with a second thread - Screen Orientation and back button. How to restore progress dialog?

2009-10-04 Thread Kacper86
@Gulfam: Hi! You don't have to anything else, just use this snippet as is was written by manoj :) On Oct 2, 8:57 am, Gulfam gulfa...@gmail.com wrote: Hi, Kasper86 i am facing problem same as you. i am showning progress dialog  but when i have changed my handset position from portrait to

[android-developers] Re: ProgressDialog with a second thread - Screen Orientation and back button. How to restore progress dialog?

2009-10-02 Thread Gulfam
Hi, Kasper86 i am facing problem same as you. i am showning progress dialog but when i have changed my handset position from portrait to landscape or landscape to portrait it show error like activity has leaked window. i have make changes in my activity as said by manoj public void

[android-developers] Re: ProgressDialog with a second thread - Screen Orientation and back button. How to restore progress dialog?

2009-10-01 Thread Kacper86
I'm creating an application to backup contacts (and sms messages, files etc.) on the device and upload it to a server. It may take a long time. So I suppose I should use a service (without spawning any additional threads) in a different process id than the activity? And as a user may from time

[android-developers] Re: ProgressDialog with a second thread - Screen Orientation and back button. How to restore progress dialog?

2009-09-30 Thread Kacper86
If I have a long running operation should i spawn a new thread or create new service with different process id (without creating new thread)? Because I'm not sure I understand the difference, despite the fact I read a lot of information concerning the subject. On Sep 29, 4:32 pm, Streets Of

[android-developers] Re: ProgressDialog with a second thread - Screen Orientation and back button. How to restore progress dialog?

2009-09-30 Thread Streets Of Boston
Depends. If premature interruption of the long running operation could cause data-corruption (e.g. uploading a large image on a remote server, for example), yes you should use a service. Note that Android can kill service-processes whenever it deems it necessary, or the user can power-off the

[android-developers] Re: ProgressDialog with a second thread - Screen Orientation and back button. How to restore progress dialog?

2009-09-29 Thread Kacper86
hi! first of all, i have to admit that i was wrong. when you set Dialog#setCancelable(false), hit home button, rerun your app, then your progress dialog does not always work. so i'm still stuck :/ @Broc Seib: thank you for your response! you said that you terminate your thread when gui thread

[android-developers] Re: ProgressDialog with a second thread - Screen Orientation and back button. How to restore progress dialog?

2009-09-27 Thread Broc Seib
I have built progress bars where I had a background thread that updated my Activity via callbacks (to do GUI updates in the UI thread). I ended up using a WeakReference object to hold the callback pointer to my Activity. I have made the assumption (right or wrong) that my UI thread may be gone

[android-developers] Re: ProgressDialog with a second thread - Screen Orientation and back button. How to restore progress dialog?

2009-09-26 Thread manoj
You need to implement the method public void onConfigurationChanged(Configuration arg0) { super.onConfigurationChanged(arg0); } in your activity. and in manifest file, you have to the statement android:configChanges=keyboardHidden|orientation for that activity. so when your

[android-developers] Re: ProgressDialog with a second thread - Screen Orientation and back button. How to restore progress dialog?

2009-09-26 Thread Kacper86
Thank you for your response! It works great - now I can change the orientation and the ProgressDialog works. And do have any ideas how to solve the problem with user hitting back or home button? I found that you may set your Dialog with Dialog#setCancelable(false). Then, the user can only hit