Android – an Android PendingIntent

androidandroid-intentandroid-pendingintent

I am a newbie to Android. I read the Android Documentation but I still need some more clarification. Can anyone tell me what exactly a PendingIntent is?

Best Solution

A PendingIntent is a token that you give to a foreign application (e.g. NotificationManager, AlarmManager, Home Screen AppWidgetManager, or other 3rd party applications), which allows the foreign application to use your application's permissions to execute a predefined piece of code.

If you give the foreign application an Intent, it will execute your Intent with its own permissions. But if you give the foreign application a PendingIntent, that application will execute your Intent using your application's permission.