> > A foreground service is sort of the way you build apps that live > indefinitely. > I wouldn't say that, foreground services die like everything else... they are persistent little buggers, but it doesn't take much to get rid of them. Especially for the app-killer-click-happy users that think it helps their device go faster.
On Thursday, October 17, 2013 6:44:31 AM UTC+3, Kristopher Micinski wrote: > > That's right, and I highly doubt you really want continuous location > updates anyway. > > If you really do, then you do want this architecture. A foreground > service is sort of the way you build apps that live indefinitely. > > Kris > > > > On Wed, Oct 16, 2013 at 11:41 PM, TreKing <[email protected]<javascript:> > > wrote: > >> >> On Wed, Oct 16, 2013 at 10:09 PM, Abhilash Baddam < >> [email protected] <javascript:>> wrote: >> >>> You mean in the service i have to request for location updates >>> continuously..? >>> >> >> He's referring to a Service with an ongoing notification so the user can >> see that your app is running and, more importantly for you, so the Android >> system keeps your app's process alive. >> >> You probably want two things: a service that will do the work and an >> Activity that will be the UI. >> When you start you app, you have start option. If you hit start, you >> create and bind to the service to get the location updates. If your >> activity is closed or sent to the background, you unbind and the service >> continues to run with a foreground notification. If your activity is >> resumed, you re-bind to the service. When the user hits stop, you stop the >> service. >> >> >> ------------------------------------------------------------------------------------------------- >> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago >> transit tracking app for Android-powered devices >> >> -- >> 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]<javascript:> >> To unsubscribe from this group, send email to >> [email protected] <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Android Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

