I am new to Android development and I had to use a repeating alarm using AlarmManager. Here I first had the opportunity to use PendingIntent. However, after reading the documentation ( http://developer.android.com/reference/android/app/PendingIntent.html ), I am really confused as to what PendingIntent really represents.
My questions:
Q1. How is the PendingIntent"waiting"? Apologies for this question, but I would like to have an intuitive understanding of what it means PendingIntent.
Q2. The documentation states:
A PendingIntent itself is simply a reference to a token maintained by a system that describes the source data used to receive it. This means that even if his own application process is killed, the PendingIntent itself will remain suitable for other processes that were provided to it. If the creator application subsequently retrieves the same kind of PendingIntent (same operation, same action, data, categories and components of Intent, and the same flags), it will receive a PendingIntent representing the same token if it is still valid, and maybe therefore cancel () to remove it.
How to do it,
reference token supported by the system describing the source data
refers to my code here?
pendingIntent = PendingIntent.getBroadcast(getApplicationContext(),0,photosIntent,0);
alarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME,SystemClock.elapsedRealtime(),
10000, pendingIntent);
Q3. I also do not understand what follows in the documentation:
- , PendingIntent. , , PendingIntent Intents, "" , , PendingIntent. . , , , Intent.filterEquals. Intent, Intent.filterEquals, PendingIntent .
extra contents? request code flag getBroadcast(Context context, int requestCode, Intent intent, int flags)?
. , . , .