File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
com.unity.mobile.notifications Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ All notable changes to this package will be documented in this file.
5
5
## [ Unreleased]
6
6
7
7
### Fixes:
8
+ - [ Android] - No longer use DeniedAndDontAskAgain permission response, only Denied.
8
9
- [ iOS] - Fix occasional crash when registering for push notifications.
9
10
10
11
## [ 2.1.0] - 2022-09-23
Original file line number Diff line number Diff line change @@ -631,6 +631,9 @@ public static PermissionStatus UserPermissionToPost
631
631
permissionStatus = PermissionStatus . Denied ;
632
632
SetPostPermissionSetting ( permissionStatus ) ;
633
633
break ;
634
+ case PermissionStatus . DeniedDontAskAgain : // no longer used, revert to Denied
635
+ permissionStatus = PermissionStatus . Denied ;
636
+ break ;
634
637
}
635
638
636
639
return permissionStatus ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public enum PermissionStatus
23
23
Denied = 2 ,
24
24
25
25
/// <summary>
26
- /// User denied permission and expressed intent to not be prompted again.
26
+ /// No longer used. User denied permission and expressed intent to not be prompted again.
27
27
/// </summary>
28
28
DeniedDontAskAgain = 3 ,
29
29
@@ -53,14 +53,14 @@ public class PermissionRequest
53
53
/// Create a new request.
54
54
/// Will show user a dialog asking for permission if that is required to post notifications and user hasn't permanently denied it already.
55
55
/// </summary>
56
- /// <see cref="PermissionStatus.DeniedDontAskAgain"/>
57
56
public PermissionRequest ( )
58
57
{
59
58
Status = AndroidNotificationCenter . UserPermissionToPost ;
60
59
switch ( Status )
61
60
{
62
61
case PermissionStatus . NotRequested :
63
62
case PermissionStatus . Denied :
63
+ case PermissionStatus . DeniedDontAskAgain : // this one is no longer used, but might be found in settings
64
64
Status = PermissionStatus . RequestPending ;
65
65
RequestPermission ( ) ;
66
66
break ;
@@ -72,7 +72,6 @@ void RequestPermission()
72
72
var callbacks = new PermissionCallbacks ( ) ;
73
73
callbacks . PermissionGranted += ( unused ) => PermissionResponse ( PermissionStatus . Allowed ) ;
74
74
callbacks . PermissionDenied += ( unused ) => PermissionResponse ( PermissionStatus . Denied ) ;
75
- callbacks . PermissionDeniedAndDontAskAgain += ( unused ) => PermissionResponse ( PermissionStatus . DeniedDontAskAgain ) ;
76
75
Permission . RequestUserPermission ( AndroidNotificationCenter . PERMISSION_POST_NOTIFICATIONS , callbacks ) ;
77
76
}
78
77
You can’t perform that action at this time.
0 commit comments