Android The four components are calledactivity/service/broadcast recevicer/content provider
activity :activity is a window for user and application interaction, a Span style= "padding:0px; margin:0px ">activity is equivalent to one of our actual pages, When you open a screen, The previous screen is placed in a paused state and pressed into the history stack, and the user can return to the previously opened screen with a fallback operation.
activity oncreate (create), onstart (Active), onresume (recovery), onpause (pause), onstop (Stop), ondestroy (Destroy), onrestart (restart)
Service : Service is a program that can run for a long time, equivalent to a service in the background, through startservice (Intent service) can start a A Servicecan be bound by Context.bindservice () .
BroadCast Recevicer intent as a trigger event, accept the relevant message, do some simple processing, converted into a notification , unified broadcastreceiver to make the app respond to an external event. broadcast Receiver via to notify the user that these things have happened, broadcastreceiver is registered in two ways, One can be registered in androidmanifest.xml , and another can be used in code at run time context.registerreceiver () to register. Users can also pass context.sendbroadcast () put their own intent broadcasts broadcast to other applications.
Content provider : A content provider that can share its own data to external calls and interfaces to third-party applications that provide data access.
Four components in the Wang Liping--android