0 Fundamentals Android (1)

Source: Internet
Author: User
Tags sqlite database

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. .apkall 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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.