Intent display intent and implicit intent

Source: Internet
Author: User

Intent is intended, the communication between the four components is divided into explicit and implicit intent through intent.

Intent a good understanding is to specify the interface to jump:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/77/96/wKioL1ZqIVHTkt-_AAAoSV6LBPg443.png "title=" QQ picture 20151211090449.png "alt=" Wkiol1zqivhtkt-_aaaosv6lbpg443.png "/>

You can pass different types of information through Putextra, which is just a few examples. You can then receive this information at secondactivity:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/77/97/wKiom1ZqIeejcPjnAAA_qyrGHrA382.png "title=" QQ picture 20151211090724.png "alt=" Wkiom1zqieejcpjnaaa_qyrghra382.png "/>

The int type is displayed when the Boolean type is received when the message to be written is not received, and is to be noted separately from the information being passed.

The implicit intent of the intent is in contrast to the interface that does not specify a jump, which jumps according to the value of the set action, as long as it matches the action value set:

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/77/96/wKioL1ZqLfGQ4QxOAAAs3O4ef80531.png "title=" QQ picture 20151211095859.png "alt=" Wkiol1zqlfgq4qxoaaas3o4ef80531.png "/>

Then set the filter condition in the manifest file Androidmanifest.xml

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/77/98/wKiom1ZqLpKSy_O8AAA_43zYay8997.png "title=" QQ picture 20151211100139.png "alt=" wkiom1zqlpksy_o8aaa_43zyay8997.png "/> So you can jump to secondactivity and get information.

Of course intent's implicit intent can also jump to another apk, as long as the value of the action is matched.

Explicit and implicit intentions of Intent

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.