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 <treking...@gmail.com> wrote:

>
> On Wed, Oct 16, 2013 at 10:09 PM, Abhilash Baddam <
> abhilash.androiddevelo...@gmail.com> 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 android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers+unsubscr...@googlegroups.com.
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to