Android in Intent and pendingintent

Source: Internet
Author: User

Intent English means intention, pending means something that is about to happen or come.
pendingintent This class is used to handle what is about to happen. For example, in the notification notification for the jump page, but not immediately jump.
Intent is started in time and Intent disappears as the activity disappears.
Pendingintent can be seen as intent packaging, usually through Getactivity,getbroadcast, getservice to get pendingintent instances, The current activity does not immediately start the intent it contains, but instead calls the intent when the pendingintent is executed externally. Because the context of the current app is saved in the pendingintent, it gives the external app the ability to execute the Intent in the pendingintent like the current app, even if the current app doesn't exist at the time of execution. Intent can also be executed through the presence of the context in the pendingintent. You can also handle the operations after intent execution. Often used with Alermanger and Notificationmanager.
intent is generally used to transfer data between activity, Sercvice, Broadcastreceiver, and pendingintent, generally used on notification,can be understood as deferred execution of the intent,Pendingintent is a wrapper over intent.

Android in Intent and pendingintent

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.