[android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-22 Thread JC
Thanks again Mark. I am exploring all 3 option one by one by searching examples on google. I will update here on status. Thanks JC On Dec 22, 1:00 pm, Mark Murphy wrote: > On Wed, Dec 22, 2010 at 2:13 AM, JC wrote: > > thanks mark, > > > I am starting service in myactivity::OnDestroy. > > Th

Re: [android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-22 Thread Mark Murphy
On Wed, Dec 22, 2010 at 2:13 AM, JC wrote: > thanks mark, > > I am starting service in myactivity::OnDestroy. That is a bad idea, since onDestroy() is not guaranteed to be called. > When i am stopping service(2nd time activity get started and service > running) I require latest value two integer

[android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-21 Thread JC
thanks mark, I am starting service in myactivity::OnDestroy. When activity is opened again, I am maintaining flag in preference that service has started. If that flag is set, then i am stopping service (or starting service with stopself parameter in intent as per yr suggestion in diff. thread in g

Re: [android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-21 Thread Mark Murphy
On Tue, Dec 21, 2010 at 1:00 AM, JC wrote: > Yes i realize that too. that Service::OnCreate and OnDestroy is called > after Activity::OnCreate and OnDestroy always. > > Then what/how can we get resultant data from service ? What is "resultant data"? Your service can communicate with the activity

[android-developers] Re: Android:: Service::OnDestroy being called late..

2010-12-20 Thread JC
Thanks Mark, Yes i realize that too. that Service::OnCreate and OnDestroy is called after Activity::OnCreate and OnDestroy always. Then what/how can we get resultant data from service ? Thanks in advance. JRC On Dec 20, 12:55 pm, Mark Murphy wrote: > On Mon, Dec 20, 2010 at 1:15 AM, JC wrote