parent
							
								
									b6e038a027
								
							
						
					
					
						commit
						dbb56e5a32
					
				|  | @ -1,6 +1,5 @@ | |||
| { | ||||
|     "name": "Guru.Editor", | ||||
|     "rootNamespace": "", | ||||
|     "references": [ | ||||
|         "Guru.Runtime", | ||||
|         "Guru.Notification" | ||||
|  |  | |||
|  | @ -17,7 +17,6 @@ namespace Guru.Notification | |||
|          | ||||
|         private bool _initOnce = false; | ||||
|         private string _notiStatus; | ||||
|         private bool _isPluginReady = false; | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// 初始化 | ||||
|  | @ -91,14 +90,8 @@ namespace Guru.Notification | |||
|         /// </summary> | ||||
|         private void InitPlugins() | ||||
|         { | ||||
|             _isPluginReady = AndroidNotificationCenter.Initialize(); | ||||
| 
 | ||||
|             if (!_isPluginReady) | ||||
|             { | ||||
|                 Debug.LogError($"[Noti][AND] --- AndroidNotificationCenter init failed!"); | ||||
|                 // TODO: 处理初始化失败的情况 | ||||
|                 return; | ||||
|             } | ||||
|             AndroidNotificationCenter.Initialize(); | ||||
|             Debug.Log($"[Noti][AND] --- Notification Service InitPlugins"); | ||||
| 
 | ||||
|             UpdateNotiStatus(); | ||||
|         } | ||||
|  | @ -108,8 +101,6 @@ namespace Guru.Notification | |||
|         /// </summary> | ||||
|         private void UpdateNotiStatus() | ||||
|         { | ||||
|             if (!_isPluginReady) return; | ||||
|              | ||||
|             TryExecute(() => | ||||
|             { | ||||
|                 _permissionStatus = AndroidNotificationCenter.UserPermissionToPost; | ||||
|  | @ -122,6 +113,7 @@ namespace Guru.Notification | |||
|                         _notiStatus = STATUS_DENIDED; | ||||
|                         break; | ||||
|                 } | ||||
|                 Debug.LogWarning($"[SDK][AND] --- UpdateNotiStatus:{_notiStatus}  |  UserPermissionToPost:{_permissionStatus}"); | ||||
|             }); | ||||
|         } | ||||
| 
 | ||||
|  | @ -130,8 +122,6 @@ namespace Guru.Notification | |||
|         private PermissionCallbacks _permissionCallbacks; | ||||
|         private void RequestAndroidPermission(Action<string> callback = null) | ||||
|         { | ||||
|             if (!_isPluginReady) return; | ||||
|              | ||||
|             _onPermissionCallback = callback; | ||||
|             UpdateNotiStatus(); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue