Android documentation about PendingIntent says:

For security reasons, the Intent you supply here should almost always be an explicit intent, that is specify an explicit component to be delivered to through Intent.setClass

It says almost always, is there a scenario when it is ok to include an implicit intent inside of a pending intent?

  • 1
    It is strongly recommended that the PendingIntent should encapsulate explicit intent as the intent will be used to interact with the application component as if it is the other component of the same application. However, in the scenario where the listening component is not performing any security-sensitive task it will be okay to include an implicit intent in a PendingIntent.
    – Shiv Sahni
    Mar 29, 2018 at 13:34

1 Answer 1


It is probably because the authors of that documentation couldn't think of a scenario where it may be ok to use an implicit intent, but didn't want to rule out the possibility that someday, somebody might think of such a scenario and want to use an implicit intent inside a pending intent, without it being a security issue. Hence, they left open that possibility.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .