Android Application Architecture

Source: Internet
Author: User
Tags vector font

I. Architecture of Android applications

The Android software hierarchy can be categorized from top to bottom:

l Applications ( application)

l application Framework (appliciation Framework)

l Various libraries (Libraries) and Android Runtime Environment (runtime)

l operating system layer (OS)

Second, the application

android apps often involve user interface and user interaction, which is something the user can actually feel. Android applications are currently written in the Java language. Application developers can also use the Application Framework layer API to implement their own programs, which is also a concrete embodiment of Android open source.

III. Application Framework

UI Components : Includes lists, text boxes, buttons.

l Content provide RS: Popular understanding content Provider is a mechanism through which applications can exchange and share data.

l Resource Ma Nager : Responsible for managing non-code, such as local image resources, XML files that involve layouts, and internationalized strings.

l Notification Manager 36>: It allows the program to display its own alert information on the status bar. such as SMS, call reminders and so on.

l Activity Manager /c45>: It manages the life cycle of an application and provides a mechanism for applying page exits. In Android applications, each application is generally composed of multiple pages, and each page is an activity, in layman's words, it can be thought that Android applications are composed of multiple activity interactions.

Iv. Library and operating environment

android contains a number of C + + libraries that can be used by different components of the Android system. They provide services to developers through the Android application framework. Core library:

l system C Library: specifically tailored for embedded Linux-based devices;

l Media Library : supports a variety of commonly used audio, Video format playback and recording, while supporting static image files;

l Surface Manager c30>: Management of the display subsystem, and provides seamless integration of 2D and 3D layers for multiple applications;

l Libwebcore: An up-to-date web browser engine to support Android browsers and an embeddable Web view;

L SGL : the underlying 2D graphics engine;

l 3D Libraries : OpenGL-based ES 1.0 A PiS implementation, the library can use hardware 3D acceleration, or use highly optimized 3D soft acceleration;

L FreeType : Bitmap and vector font display;

L SQLite : A lightweight relational database engine that is powerful and available for all applications;

Five, the composition of Android applications

android Apps typically consist of the following four parts: Activity,broadcast Intent recevier,service,content Provider.

of course an application can consist of four or four of the above.

There is an XML description file inside the Android project, Called Androidmanifest.xml. In this file you need to declare the top 4 class component names used, as well as possible descriptions of the functionality and requirements of each component.

with Intent we can jump between multiple activity. The two most important parts of intent are the data corresponding to the actions and actions of the intent. Typical movements are main,view,pick,edit and so on. The data corresponding to the action is represented in the form of a URI. A class related to intent is called intent Filters. If intent is a valid request, a intent filters is used to describe which intent an activity can manipulate. An activity if you want to show a person's contact, you need to declare a Intent Filters, this Intent Filters to know how to deal with the view action and represent a person 's uri.intent Filters are generally defined in the Androidmanifest.xml.

you can use Broadcastreceiver to make your app respond to an external event. Broadcastreceiver cannot generate a UI that is not transparent to the user and is not visible to the user. Broadcastreceiver through Notificationmanager to inform the user that these things have happened. Broadcastreceiver can be registered in the Androidmanifest.xml, or it can be registered using Context.registerreceiver () in code at run time. As soon as the event arrives, even if the program does not start, the system starts the program when it becomes necessary, and various applications can also broadcast their own intent broadcast to other applications by using CONTEXT.SENDBROADCASR ().

android data is private in the system, of course, including file data and database data, as well as some other types of data. The content provider class implements a standard set of method interfaces that enable other applications to save or read the various data types of this content provider.

Vi. Composition of Android application engineering documents

l source file : in src directory

l R.java file: This file is automatically generated by Eclipse, the developer does not need to modify the content inside, the contents of the modification by Eclipse Automatic Processing, r file for the application developer is basically useless, but for Android system, Android for the global index of resources, when the res text When the contents of the folder change, R.java will recompile and update synchronously.

l Android Library: This is the Android library that the app runs

l Assets directory : Storage of multimedia and other files

l res directory : The resource file that is used to place the application, when the file is changed, The r file will change automatically

l drawable directory : The primary placement of the image resources applied to

L Layout Directory: The layout file that is used for the primary placement, all XML files

l values directory : Main storage string, color, arrays, which are XML files

l Androidmanifest.xml: Equivalent to the configuration file, in this file must declare the name of the application, the application of the Activity,service and receiver, and so on.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android Application Architecture

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.