Thanks for the message. :P The solutions sounds cool. I'll try it out. On Mar 24, 10:11 am, Mark Murphy <[email protected]> wrote: > Kateling wrote: > > Hi, there > > I want to create a service that runs on Android which can collect all > > ofmylocationinformation. 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, reply using "remove me" as the subject.

