Derek
2009-08-04 21:22:55 UTC
Hi all,
The PendingIntent documentation describes flags.
http://developer.android.com/reference/android/app/PendingIntent.html
public static PendingIntent getService (Context context, int
requestCode, Intent intent, int flags)
Flags values could be:
FLAG_CANCEL_CURRENT:268435456
FLAG_NO_CREATE:536870912
FLAG_ONE_SHOT:1073741824
FLAG_UPDATE_CURRENT:134217728
I'm using the following code:
PendingIntent pendingIntent = PendingIntent.getService(this, 0,
updateIntent, 0);
AlarmManager alarmManager = (AlarmManager)getSystemService
(Context.ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC, nextUpdate, pendingIntent);
I'm passing zero as flag value. What flag is used then ?
Whatever number of calls to alarmManager.set() with different time,
only the last pending intent instance is taken into account. All
previous ones seem ignored. Is this behavior related to PendingIntent
flag ? Documentation says that requestcode is not used?
Thanks.
The PendingIntent documentation describes flags.
http://developer.android.com/reference/android/app/PendingIntent.html
public static PendingIntent getService (Context context, int
requestCode, Intent intent, int flags)
Flags values could be:
FLAG_CANCEL_CURRENT:268435456
FLAG_NO_CREATE:536870912
FLAG_ONE_SHOT:1073741824
FLAG_UPDATE_CURRENT:134217728
I'm using the following code:
PendingIntent pendingIntent = PendingIntent.getService(this, 0,
updateIntent, 0);
AlarmManager alarmManager = (AlarmManager)getSystemService
(Context.ALARM_SERVICE);
alarmManager.set(AlarmManager.RTC, nextUpdate, pendingIntent);
I'm passing zero as flag value. What flag is used then ?
Whatever number of calls to alarmManager.set() with different time,
only the last pending intent instance is taken into account. All
previous ones seem ignored. Is this behavior related to PendingIntent
flag ? Documentation says that requestcode is not used?
Thanks.