Re: [android-developers] stopping a thread after particular time.
you can asynctask just extend your class with asynctask ,check the condition(if it finds any location then return true there) in the doinbackground() method of asynctask and then dismiss the progressbar in postexecute()method of asynctask. Ch.B.Sagar. On Fri, Mar 2, 2012 at 12:39 PM, Narendra Singh Rathore nsr.curi...@gmail.com wrote: better you use handler if your finds out any location then just call the handler.sendEmptyMessage() from there and handle that message and dismiss the progress bar in the handleMessage() method of handler. Thanks Sagar, Plz suggest if there exists any other possible method for achieving my goal, rather than doing it with threads. In short, is there any provision here in android to make any delay or pause, just like Thread.sleep() ? -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] stopping a thread after particular time.
On Fri, Mar 2, 2012 at 12:26 AM, Narendra Singh Rathore nsr.curi...@gmail.com wrote: May you please suggest any good tutorial for it? Google it - I assure you, you will find plenty of information on the topic. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] stopping a thread after particular time.
Hi all developers, I am showing progress bar, before getting current GPS location (using Thread) in case if location is null. Now, my requirement is to dismiss the progress dialog in case if location is unavailable even after the specified amount of time, and perform something else in that case. I guess, I need another thread for performing that event after specified time, or stopping the previous thread. I googled a lot for reaching to my goal, but still unanswered. I will feel thankful if any of you guys, can direct me to achieve that. With Regards, NSR -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] stopping a thread after particular time.
On Thu, Mar 1, 2012 at 10:52 AM, Narendra Singh Rathore nsr.curi...@gmail.com wrote: I guess, I need another thread for performing that event after specified time, or stopping the previous thread. You don't need multiple threads, use AsyncTask. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] stopping a thread after particular time.
You don't need multiple threads, use AsyncTask. Thanks Treking for the suggestion. But, I am new for using AsyncTask. May you please suggest any good tutorial for it? -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] stopping a thread after particular time.
better you use handler if your finds out any location then just call the handler.sendEmptyMessage() from there and handle that message and dismiss the progress bar in the handleMessage() method of handler. Ch.B.Sagar. On Fri, Mar 2, 2012 at 11:56 AM, Narendra Singh Rathore nsr.curi...@gmail.com wrote: You don't need multiple threads, use AsyncTask. Thanks Treking for the suggestion. But, I am new for using AsyncTask. May you please suggest any good tutorial for it? -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] stopping a thread after particular time.
better you use handler if your finds out any location then just call the handler.sendEmptyMessage() from there and handle that message and dismiss the progress bar in the handleMessage() method of handler. Thanks Sagar, Plz suggest if there exists any other possible method for achieving my goal, rather than doing it with threads. In short, is there any provision here in android to make any delay or pause, just like Thread.sleep() ? -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Stopping a Thread
Can anyone tell me how to safely stop a thread? It seems that all the methods I can see to use are deprecated :-). Thanks. Sincerely, Brad Gies - Brad Gies 27415 Greenfield Rd, # 2, Southfield, MI, USA 48076 - Moderation in everything, including abstinence --~--~-~--~~~---~--~~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---