The actual intents being provided to the functions are flagged with
FLAG_ACTIVITY_NEW_TASK.
The intent is started and then passed to the code above.
When creating the pending intent with FLAG_CANCEL_CURRENT I receive
the error message Can't use FLAG_RECEIVER_BOOT_UPGRADE here.

This only occurs after the intent has been started.


On Apr 29, 9:58 pm, Dianne Hackborn <[email protected]> wrote:
> The Intent flags are supposed to be put on the Intent object (where they are
> defined).  The flags when creating a pending intent are different.
>
> Also FLAG_RECEIVER_BOOT_UPGRADE is not for applications to use.  It is not
> in the SDK.
>
>
>
>
>
> On Thu, Apr 29, 2010 at 4:03 PM, cnich <[email protected]> wrote:
> > Info on this error is elusive. It occurs in versions greater than 2.0.
>
> > I am firing a one time alarm using a Pending Intent. To create the
> > PendingIntent I pass an intent (alarm), context and, receiver class
> > into a function called startAlarm.
>
> > alarm.setClass(context, receiver);
> > PendingIntent alarmIntent = PendingIntent.getBroadcast(context, API_ID
> > +alarm.getIntExtra(ALARM_ID, -1), alarm,
> > PendingIntent.FLAG_CANCEL_CURRENT);
>
> > I can call the function without error before the alarm occurs ... but
> > after the PendingIntent has launched I receive
>
> > Can't use FLAG_RECEIVER_BOOT_UPGRADE here, when calling getBroadcast()
>
> > This occurs with all FLAGS except NO_CREATE.
>
> > What exactly is causing this error?
>
> > Thanks for any info.
>
> > -Cody
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%2bunsubs­[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to