[android-developers] Starting an intent, then pressing the back button, how to resume the Handler that was running?

2011-03-05 Thread Chris Stewart
Here's the scenario: - On an Activity I have a Handler that is posting a message every 5 seconds. - If I click on an item in my ListView, for the above Activity, it starts a new Activity by way of Intent. - Clicking back on the phone will take me back to the previous Activity but my Handler isn't

Re: [android-developers] Starting an intent, then pressing the back button, how to resume the Handler that was running?

2011-03-05 Thread TreKing
On Sat, Mar 5, 2011 at 7:26 PM, Chris Stewart wrote: > I tried onResume but that was even called when I visited the initial > Activity the first time, so I'm guessing there's something else I should be > doing. I usually go with onStart() / onStop() for things that need to happen while the user

Re: [android-developers] Starting an intent, then pressing the back button, how to resume the Handler that was running?

2011-03-06 Thread Chris Stewart
I was mistakenly using onCreate to restart the background process, instead of onStart. Thanks for the refresher. :) -- Chris Stewart http://chriswstewart.com On Sat, Mar 5, 2011 at 8:29 PM, TreKing wrote: > On Sat, Mar 5, 2011 at 7:26 PM, Chris Stewart wrote: > >> I tried onResume but that w

Re: [android-developers] Starting an intent, then pressing the back button, how to resume the Handler that was running?

2011-03-07 Thread Gökalp Kuşçu
moveTaskToBack(true); ?? 2011/3/6 TreKing > On Sat, Mar 5, 2011 at 7:26 PM, Chris Stewart wrote: > >> I tried onResume but that was even called when I visited the initial >> Activity the first time, so I'm guessing there's something else I should be >> doing. > > > I usually go with onStart() /