Benefits of using intent, meaning of callbacks

Source: Internet
Author: User
Tags call back

Benefits of using Intent:

(1) Android uses a unified intent object to encapsulate the "start intent", providing a consistent programming model that can initiate activity, Service, broadcastreceiver components

(2) An application can start a component with a certain feature, without coupling to a specific component, using a high-level decoupling

(3) is an important medium between application component communication, carrying bundle object data with intent


Meaning of the callback:

It is common to implement an application architecture with a common nature, and at a particular point, a piece of business-related code is needed.

The common program architecture cannot implement this code, then the program schema will leave a "null" ("callback" called this "Empty" method).

For Java, this "empty" can exist in two forms

(1) The interface form, the implementation of the interface will implement the method of the interface

(2) In the form of activity, a specific point on the method has been defined, such as OnCreate, Onactivityresult and other methods

Developers rewrite these methods, and the general architecture will call back on these methods to do business-related processing.


Benefits of using intent, meaning of callbacks

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.