views:

21

answers:

1

Hi, im following the tutorial from developers guide but i have a problem...

tutorial says: "To clear the status bar notification when the user selects it from the Notifications window, add the "FLAG_AUTO_CANCEL" flag to your Notification object"

but... how i can add the flag to my notification?

notification doesn't have any kind of function to add flags.... then? how i can do it?

+1  A: 

Flags go on the end when you define the Intent, like this:

PendingIntent contentIntent = PendingIntent.getActivity(getApplicationContext(), 0, notifyIntent, Notification.FLAG_AUTO_CANCEL);
ShadowGod