标签:request VID most const creates 函数 tor ring mes
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
IntentService(String name)
Creates an IntentService.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
IBinder | onBind(Intent intent)
Unless you provide binding for your service, you don‘t need to implement this method, because the default implementation returns null.
|
||||||||||
void | onCreate()
Called by the system when the service is first created.
|
||||||||||
void | onDestroy()
Called by the system to notify a Service that it is no longer used and is being removed.
|
||||||||||
void | onStart(Intent intent, int startId)
This method is deprecated. Implement
onStartCommand(Intent, int, int) instead. |
||||||||||
int | onStartCommand(Intent intent, int flags, int startId)
You should not override this method for your IntentService.
|
||||||||||
void | setIntentRedelivery(boolean enabled)
Sets intent redelivery preferences.
If enabled is true, If enabled is false (the default), |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void | onHandleIntent(Intent intent)
This method is invoked on the worker thread with a request to process.
This method is invoked on the worker thread with a request to process. Only one Intent is processed at a time, but the processing happens on a worker thread that runs independently from other application logic. So, if this code takes a long time, it will hold up other requests to the same IntentService, but it will not hold up anything else. When all requests have been handled, the IntentService stops itself, so you should not call
stopSelf() .该函数用于针对Intent的不同进行不同的事务处理就可以了.执行完所一个Intent请求对象所对应的工作之后,如果没有新的Intent请求达到,
则自动停止Service;否则ServiceHandler会取得下一个Intent请求传人该函数来处理其所对应的任务。
|
<serviceandroid:name=".MyIntentService"/>
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!希望你也加入到我们人工智能的队伍中来!https://www.cnblogs.com/captainbed
标签:request VID most const creates 函数 tor ring mes
原文地址:https://www.cnblogs.com/siwnchh/p/10148387.html