diff --git a/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.Message.cs b/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.Message.cs index fa4b30b..31ef01f 100644 --- a/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.Message.cs +++ b/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.Message.cs @@ -142,13 +142,15 @@ namespace Guru private static void OnTokenReceived(object sender, TokenReceivedEventArgs token) { + Debug.Log($"{LOG_TAG} --- OnTokenReceived:{token.Token}"); #if UNITY_IOS DeviceUtil.SetiOSBadge(); #endif } - public static void OnMessageReceived(object sender, MessageReceivedEventArgs e) + public static void OnMessageReceived(object sender, MessageReceivedEventArgs args) { + Debug.Log($"{LOG_TAG} --- OnMessageReceived:{args.Message}"); #if UNITY_IOS DeviceUtil.SetiOSBadge(); #endif diff --git a/Runtime/GuruNoification/Manager/NotificationAgentAndroid.cs b/Runtime/GuruNoification/Manager/NotificationAgentAndroid.cs index 6953527..6186c98 100644 --- a/Runtime/GuruNoification/Manager/NotificationAgentAndroid.cs +++ b/Runtime/GuruNoification/Manager/NotificationAgentAndroid.cs @@ -11,6 +11,7 @@ namespace Guru.Notification { private const string FCM_DEFAULT_CHANNEL_NAME = "fcm_default_channel"; private const string FCM_DEFAULT_CHANNEL_ID = "default_notification_channel_id"; + private const string FCM_DEFAULT_CHANNEL_DESC = "Default cloud messaging channel"; private const string STATUS_GRANTED = "granted"; private const string STATUS_DENIDED = "denied"; // private const string STATUS_NOT_DETERMINED = "not_determined"; @@ -160,8 +161,11 @@ namespace Guru.Notification { // 低版本处理方式 Debug.Log($"[SDK][Noti] --- #2 SDK {sdkInt} not requested -> open channel"); - AndroidNotificationCenter.RegisterNotificationChannel(new AndroidNotificationChannel(FCM_DEFAULT_CHANNEL_ID, - FCM_DEFAULT_CHANNEL_NAME, "", Importance.Default)); // 打开ChannelID + AndroidNotificationCenter.RegisterNotificationChannel(new AndroidNotificationChannel( + FCM_DEFAULT_CHANNEL_ID, + FCM_DEFAULT_CHANNEL_NAME, + FCM_DEFAULT_CHANNEL_DESC, + Importance.Default)); // 打开ChannelID SetGrantStatus(STATUS_GRANTED); } else