Search Unity

Clear notification badges?

Discussion in 'Android' started by ADNCG, Mar 20, 2022.

  1. ADNCG

    ADNCG

    Joined:
    Jun 9, 2014
    Posts:
    994
    I'm trying to clear the notifications badge using unity's mobile notifications package. Problem is I'm also somehow clearing scheduled notifications in the process.

    I've attempted to use
    Code (CSharp):
    1. GameNotificationsManager.DismissAllNotifications()
    method from the samples.

    As far as I understand it, this is a wrapper that handles per-platform calls. For android it calls :
    Code (CSharp):
    1. AndroidNotificationCenter.CancelAllDisplayedNotifications();
    Which my understanding is that it should clear notifications that have occurred not but pending notifications. However it seems to clear pending notifications as well.

    Any idea where I'm going wrong?