Like getActivity(Context, int, Intent, int)
, but allows an array of Intents to be supplied. The first Intent in the array is taken as the primary key for the PendingIntent, like the single Intent given to getActivity(Context, int, Intent, int)
. Upon sending the resulting PendingIntent, all of the Intents are started in the same way as they would be by passing them to startActivities(Intent[])
.
The first intent in the array will be started outside of the context of an existing activity, so you must use the Intent.FLAG_ACTIVITY_NEW_TASK
launch flag in the Intent. (Activities after the first in the array are started in the context of the previous activity in the array, so FLAG_ACTIVITY_NEW_TASK is not needed nor desired for them.)
The last intent in the array represents the key for the PendingIntent. In other words, it is the significant element for matching (as done with the single intent given togetActivity(Context, int, Intent, int)
, its content will be the subject of replacement by send(Context, int, Intent)
andFLAG_UPDATE_CURRENT
, etc. This is because it is the most specific of the supplied intents, and the UI the user actually sees when the intents are started.