Components of Android Apps

Source: Internet
Author: User
Tags home screen

Android applications consist of loosely coupled components and are bound together using application manifest: Application manifest describes each component and how they interact, and also specifies application metadata, its hardware and platform requirements, external libraries, and required permissions.

The following components provide the basic architecture module for the application:

  • Activity: The presentation layer of the application. Each UI in an application is implemented through one or more extensions of the activity class. Activity uses fragment and views to lay out and display information, as well as respond to user actions.

  • Service: A worker that is not visible in the application. Service components do not have a UI at run time, they can update data sources and activity, trigger notifications, and broadcast intent. They are used to perform some long-running tasks or tasks that do not require user interaction.

  • Content Provider: A shareable persistent data storage. Content provider is used to manage and persist application data, typically interacting with SQL databases. Content provider is the preferred method for sharing data between applications. You can configure your own content Provider to allow other applications to access, or you can access the content Provider provided by other applications. Android devices contain several local content provider to provide useful databases, such as media libraries and contact information.

  • Intent: A powerful messaging framework between applications. Intent is used extensively in Android. The intent can be used to start and stop activity and service, broadcast messages on a system-wide or to a target activity,service or broadcast receiver, and request operations on specific data.

  • broadcast receiver: Intent listener. Broadcast receiver enables applications to listen to intent broadcasts that match the specified filtering criteria. Broadcast receiver automatically launches the application to respond to a received intent, which makes them the best choice for event-driven applications.

  • Widget: A visual application component that is typically added to the home screen of a device. Widgets are a special variant of broadcast receiver that can be used to create dynamic, interactive application components that users can add to their home screen.

  • Notification: Notification allows signals to be sent to the user, but does not unduly attract their attention or disrupt their current activity. They are the preferred method of attracting attention to the user when the application is not visible or inactive (especially service or broadcast Receiver). For example, when a device receives a text message or an e-mail message, the messaging application or Gmail application can alert you by flashing the light, making a sound, displaying an icon, or scrolling through the message summary. This is the use of the notification function. You can also use notification in your own applications.

Components of Android Apps

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.