Activity 方法,Service 方法。

Activity方法:

onCreate()

onRestart()

onStart()

onResume()

onPause()

onStop()

onDestroy()

onSaveInstanceState()

onRestoreInstanceState()

 

Service方法:

void onCreate()

void onStart(Intent intent)

void onDestroy()

 

Context.startServicel(),Context.stopService()

Service.stopSelf(),Service.stopSelfResult().

Context.bindService(),Context.unbindService().

 

如果一个服务允许别的进程绑定,则它还会有以下额外的回调方法以供实现:
IBinder onBind(Intent intent)
boolean onUnbind(Intent intent)
void onRebind(Intent intent)

posted on 2010-09-17 10:55  grass_dcm  阅读(217)  评论(0编辑  收藏  举报