Unity-Technologies/com.unity.mobile.notifications

Wrong status after swipe away the dialog

IgorGalimski opened this issue · 2 comments

I found an issue with 2.1.0 version
When I request the permission with PermissionRequest class and swipe away the dialog - the state of permission is
DeniedDontAskAgain. It sounds wrong - because according to android documentation the status should not change:
https://developer.android.com/develop/ui/views/notifications/notification-permission#user-swipe-away
User swipes away from dialog
If the user swipes away from the dialog—that is, they don't select either allow or don't allow—the state of the notification permission doesn't change.

Apart from this - when I try to request the permission again - I can't do it, because PermissionRequest class has check for Denied status:

    public PermissionRequest()
    {
        Status = AndroidNotificationCenter.UserPermissionToPost;
        switch (Status)
        {
            case PermissionStatus.NotRequested:
            case PermissionStatus.Denied:
                Status = PermissionStatus.RequestPending;
                RequestPermission();
                break;
        }
    }

It means - after I swipe away the dialog I can't request the permission anymore

Opened a ticket in core Unity, the issue is there.