I am trying to understand from the API the purpose of PendingIntent.
Sometimes some methods I use requires this, I still did not get the idea right.
Can anyone could explain? why can’t i just use context?
Thanks,
moshik
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A
PendingIntentis a combination of a gross action (start an activity? start a service? send a broadcast?), the action details (in the form of anIntent), and aContext. ThePendingIntentis handed to the operating system, which will perform the gross action on theIntentat some future point (hence, “pending”). TheContextis for security — Android will execute thePendingIntentwith only the permissions of theContext, so aPendingIntentcannot access things that theContextrequesting it cannot.