Hi Tim,
There's a local service binding example in ApiDemos which I'm pretty sure
does exactly that:

http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/app/LocalServiceBinding.html

However, I think you're better off using AlarmManager to start a service
periodically. This is a common practice, and you should be able to find more
information about it in this and other forums.

Cheers,
James

On Sun, Oct 4, 2009 at 11:01 PM, Tim <vkan...@gmail.com> wrote:

>
> Hello,
>
> I am very new beginner, and I am designing a small application as
> below.
>
> - After a user starts the application, he/she can click the start
> button to start a background task. (e.g. retrieving the news headlines
> periodically, then do something...)
>
> - Even after the user quits the application, the background task still
> running.
>
> - To stop the background task, the user needs to run the application
> again, and clicks the stop button to stop the background task.
>
> In the above scenario, what API should I use ? (Local Service
> Binding ? Remote Service Binding ? Handler ?)
>
> Please help me. Thank you very much.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to