Overview
Before you learn a new technology, you need to understand the overall framework of this technology, so let's start with the ANDROID program structure.
The Android APP has four top-level classes: Activity, Service, ContentProvider, Broadcastreceiver.
Top Level class
- Activity
Activity is one of the most important concepts in Android apps. When you open an App, the interface you see is an Activity. The images, buttons, input boxes, and lists are all the View in this Activity.
- Service
Guess you can guess, the Service is running in the background, no interface.
- ContentProvider
If you want to allow other apps to access your data, define a contentprovider. If you want to access other people's data, use Getcontentresolver () to get a Contentresolver object query, if you have this permission.
- Broadcastreceiver
Do you know why your phone has a variety of chaotic notifications on the Internet? That's the thing. Android has some default broadcasts, you define the corresponding Broadcastreceiver will be automatically called after.
Entrance Method
Android has no entry class, no Entry method. Specifically, the initiator is based on the Androidmanifest.xml to determine the entry Activity.
Android Development Quick guide: Android program framework "Grass"