Analysis of Android applications

Source: Internet
Author: User

For an Android appProgramIt consists of four parts:

    • Activity
    • Intent receiver er
    • Service
    • Content Provider

Once you determine which components are used, you need to list them in androidmanifest. xml.

Activity

An activity is almost a view (screen ). Every activity is a class inherited from the activity base class, which is composed of view and Event Response. When you move to another view, a new activity is started. When the new view is started, the previous view is paused (a State of the activity lifecycle) and is pushed into the history stack (used to store the stack of the user activity ).

Intent and intentfilter

Intent is a collection of actions and content. Intent is like a URL, which is sent to the system and used by other activities to process the actions and content specified in the URL.

Service

To process Background processes, Android introduces the concept of service. Service is a long-lived component in Android, which does not implement any user interface. The most common example is the media player program. It can still play songs when it is switched to the background. or, for example, the file download program can download files in the background. 

 Content Provider

Android applications can use files or sqllite databases to store data. Content provider provides a way to share data between multiple applications. For example, contact information can be accessed by multiple applications. Content Provider is a class that implements a set of standard methods used to provide data access for other applications. The application can perform the following operations in the content provider: query data, modify data, add data andDelete data 

 

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.