> That's not *quite* what I'm after... I want the service to continue > running (whatever happens to the calling activity) and then later > (i.e. 2 hours) when the user calls the activity again (could be > recreated or restarted) the service can be bound to, information > collected from it, and then destroyed. > > Yes, that sums it up. Does the model you suggest still fit?!
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-are-not/ All you are going to do is get task killers attacking your app because you drain the battery. 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 -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- 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

