parent
							
								
									ffcb846a64
								
							
						
					
					
						commit
						a53c153338
					
				|  | @ -12,6 +12,7 @@ namespace Guru.Notification | ||||||
|         public const string FCM_DEFAULT_CHANNEL_ID = "fcm_default_channel"; |         public const string FCM_DEFAULT_CHANNEL_ID = "fcm_default_channel"; | ||||||
|         private const string STATUS_GRANTED = "granted"; |         private const string STATUS_GRANTED = "granted"; | ||||||
|         private const string STATUS_DENIDED = "denied"; |         private const string STATUS_DENIDED = "denied"; | ||||||
|  |         private const string STATUS_NOT_DETERMINED = "not_determined"; | ||||||
|         private const int REQUEST_PERMISSION_SDK_VERSION = 33; |         private const int REQUEST_PERMISSION_SDK_VERSION = 33; | ||||||
|         private const string PERMISSION_POST_NOTIFICATION = "android.permission.POST_NOTIFICATIONS"; |         private const string PERMISSION_POST_NOTIFICATION = "android.permission.POST_NOTIFICATIONS"; | ||||||
|          |          | ||||||
|  | @ -24,8 +25,7 @@ namespace Guru.Notification | ||||||
|         public void Init() |         public void Init() | ||||||
|         { |         { | ||||||
|             if (!_initOnce) return; |             if (!_initOnce) return; | ||||||
| 
 |              | ||||||
|             SetGrantStatus(false); |  | ||||||
| #if UNITY_ANDROID | #if UNITY_ANDROID | ||||||
|             InitPlugins(); |             InitPlugins(); | ||||||
| #endif | #endif | ||||||
|  | @ -106,8 +106,11 @@ namespace Guru.Notification | ||||||
|                 _permissionStatus = AndroidNotificationCenter.UserPermissionToPost; |                 _permissionStatus = AndroidNotificationCenter.UserPermissionToPost; | ||||||
|                 switch (_permissionStatus) |                 switch (_permissionStatus) | ||||||
|                 { |                 { | ||||||
|  |                     case PermissionStatus.NotRequested: | ||||||
|  |                         _notiStatus = STATUS_NOT_DETERMINED; | ||||||
|  |                         break; | ||||||
|                     case PermissionStatus.Allowed: |                     case PermissionStatus.Allowed: | ||||||
|                         SetGrantStatus(true); |                         _notiStatus = STATUS_DENIDED; | ||||||
|                         break; |                         break; | ||||||
|                     default: |                     default: | ||||||
|                         _notiStatus = STATUS_DENIDED; |                         _notiStatus = STATUS_DENIDED; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue