> Presumably. Of course, I really wish you wouldn't write an app like that:
>
> http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-a...
>
> All you are going to do is get task killers attacking your app because you
> drain the battery.

Well in this instance I will be telling the user not to do so, and the
nature of the service will make it quite clear that this would be the
case, they would know not to do it.

> But, assuming your proposed implementation is unavoidable:
>
> -- call startService() whenever whatever triggers the "start collecting
> data now" stuff
>
> -- call bindService() in onStart()
>
> -- call unbindService() in onStop()
>
> -- call stopService() whenever whatever triggers the "stop collecting data
> now" stuff

Ok, will try that - though I seem to remember if I called unBind()
then I couldn't rebind later...

Many thanks.

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

Reply via email to