Android is developed using the Java language. The Android SDK tool compiles code-as well as arbitrary data and is packaged into an Android package with related resources, which is a .apk
compressed file with the suffix. .apk
all the code in a file is a program. this. apk file is used to install this program on Android devices.
Application components
Component thing an Android program is a critical building block, and each build is a different way for the system to enter your application, but not all of the components are real portals into the application, some of which depend on other programs, but each component exists in its unique form and plays a special role.
Android applications have four components, each of which has a unique role and a separate life cycle that defines how attachments are created and destroyed.
First of all, the components of four applications:
1.Activity
An activity provides a separate interface for the user. For example, a mail application may have an activity, he presents a list of new messages, and the other activity is used to edit the message, although the activity is grouped together to form a program, but each one is relatively independent, Other programs can also initiate these activity.
An activity is implemented as a subclass of activity.
2.Service
The service acts as a component running in the background, which is used to perform time-consuming operations or remote processes. A server does not provide a user interaction interface
A sercice is implemented as a subclass of a service.
3.Content provide
A content provide is used to manage data sharing sets for applications, and you can store data through the file system, SQLite database, Web site, or other persistent storage locations that your application can access, via content provide Other programs can query or even modify your data.
A content provide is implemented as a subclass of Contentprovide, and some standard set of APIs must be implemented so that other programs can perform transactions.
4.Broadcast Reveicer
Broadcast receiver is a broadcast component that is used in the corresponding system-wide. Many broadcasts emanate from the system itself. For example: the notification screen system has been turned off, the battery is low, and the photo is filmed on the broadcast.
Something's going on.
0 Fundamentals Android (1)