dimanche 3 mai 2015

Cancel and Re-create new PendingIntent

I am creating a notification in my Game. I want to show the notification if the player is not playing the game for sometime. I am using the below PendingIntent setup to create a notification. With this I am able to create notifications.

Question: If the player plays the game I need to cancel the existing pending Intent and create a new Pending Intent. I hope the Pending Intent flags will be used to achieve ? Please advice. Also it would be a great help if you could throw some light on the available Flags.

PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_ONE_SHOT);

Aucun commentaire:

Enregistrer un commentaire