parent
eba48e4a75
commit
34ae9e3f0b
|
|
@ -12,7 +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 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";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ namespace Guru.Notification
|
||||||
Agent.RequestPermission(callback);
|
Agent.RequestPermission(callback);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Debug.LogError($"[SDK][Noti] --- Agent is missing, return default status: {DEFAULT_USER_STATUS}");
|
||||||
callback?.Invoke(DEFAULT_USER_STATUS);
|
callback?.Invoke(DEFAULT_USER_STATUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -87,7 +88,12 @@ namespace Guru.Notification
|
||||||
|
|
||||||
public static string GetStatus()
|
public static string GetStatus()
|
||||||
{
|
{
|
||||||
return Agent?.GetStatus() ?? DEFAULT_USER_STATUS;
|
if(!_initOnce) Initialize();
|
||||||
|
|
||||||
|
if(Agent != null) return Agent.GetStatus();
|
||||||
|
|
||||||
|
Debug.LogError($"[SDK][Noti] --- Agent is missing, return default status: {DEFAULT_USER_STATUS}");
|
||||||
|
return DEFAULT_USER_STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue