Kateling wrote: > Hi, there > I want to create a service that runs on Android which can collect all > of my location information. Either write the information to a file or > send to a server using 3G/wiki network. > I was thinking about using a service that runs forever as a daemon. > After reading "Diamonds are forever, services are not" by Mark Murphy, > I realized that it is not a good idea.
I don't know if I'd trust him. I hear he's balding. :-) > However, I need to somehow acquire the moving trajectory information > on the Android phone. Without a daemon service running forever, how do > I do that ? Have a service wake up with an AlarmManager, hang around long enough to get a fix (or some timeout indicating you will not get a fix), then stopSelf(). This will allow your users to be able to configure the polling period, to trade off battery time, privacy, etc. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.0 Available! -- 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 To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

