Gaurav Agarwal
Gaurav Agarwal

Reputation: 151

Ongoing notifications getting canceled upon clicking

I am trying to create an ongoing notification using remoteviews. Problem is upon clicking, the notification gets canceled.

Upvotes: 3

Views: 119

Answers (1)

Jijo Varghese
Jijo Varghese

Reputation: 69

That's because you've set

notification.flag = Notification.auto_cancel

or

new NotificationCompat.Builder(this)
    .setAutoCancel(true)

Remove any of these code snippets then it will be ok.

Upvotes: 1

Related Questions