Android的后台服务,比如与方法的交互式调用后台、方法、Android

2023-09-06 14:06:13 作者:南栀倾寒°

我不是专家,Android和我期待的一个例子一个Android应用程序,它使用的,其中有真正的实用方法,或者换句话说,什么是服务,可能是有用的服务,我们什么时候需要it.Something超越了简单的服务的例子。

I am not expert in android and I am looking for an example for an Android application which use a service in which there are real functional methods or in other words what a service could be useful for, when do we need it.Something beyond a simple services example..

推荐答案

我敢肯定,你渴望得到一些工作code,但是如果你是新到Android服务的工作示例大概会筹集更多的问题......

I'm sure you're eager to get some working code, but if you're new to android a working example of a service will probably raise more questions...

我建议自己熟悉的后台进程类型,并确定您需要:

I suggest familiarizing yourself with the types of background processes and determine which you need:

简要说明服务与AsyncTask的

类型的后台进程

这里是一个服务的例子:

Here is an example of a Service:

http://www.vogella.com/articles/AndroidServices/article.html

下面是一个AsyncTask的

Here is an example of an AsyncTask

http://www.vogella.com/articles/AndroidPerformance/article.html#asynctask

http://developer.android.com/reference/android/os/AsyncTask.html

决定哪些后台程序类型需要,设法得到它的工作,如果它不工作,张贴code以及您的要求。

Decide which type of background process you need, try to get it working and if it doesn't work post the code along with your requirements.