Activity:
Oncreat () OnStart () Onrestart () Onresume () OnPause () OnStop () ondestory ()
Four basic statuses: pause and stop pending in the event
Standard mode creates a new activity
Singletop mode call top activity does not create a new
Singletask mode an activity instance has only one
SingleInstance Mode New Task
Resume Activity Onsaveinstancestate () Oncreat () {Savedinstancestate.get ()}
Intent:
Action data category type component Extras flag
Show Intent SetComponent () SetClass ()
Implicit Intent-Interfilter
Broadcastreceeiver:
Inheriting Broadcastreceiver implementing the Onreceiver () function
Static registration Androidmanifest.xml Dynamic Registration Oncreat () or OnStart () in the Register onStop () or ondestory () revocation
Regular broadcast ordered broadcast (Intent-filter priority)
Service:
OnCreate () Onstartcommand () Onbind (return null) OnDestroy ()
StartService ()->oncreate ()->onstartcommand ()->running-> OnDestroy ()
The start form of the Service inheritance service (executed in the main thread) inherits Intentservice (creating a new thread serial execution) simply implements the Onhandleintent () method
Bindservice ()->oncreate ()->onbind (return ibinder), binded-> onunbind ()->ondestroy ()
A binding form of service inheritance service creates a inner class inherits binder creation GetService (return outerservice.this) method
Serviceconnection class: Onserviceconnected (), onservicedisconnected ()
Contentprivoder:
OnCreate () query () update () getType () Delete () insert () Uri.parse (String)
Getcontentresolver () android:authorities
Android Four components