public void CreateNotificationChannel() { if (NotificationChannelsApiCheck()) { return; } var group = new NotificationChannelGroup(_groupIdInputField.text, RandomName()) { Description = "Android-Goodies test notification channel group" }; AGNotificationManager.CreateNotificationChannelGroup(group); var channel = NewNotificationChannel(_channelIdInputField.text, RandomName(), group.Id); channel.ShowBadge = true; AGNotificationManager.CreateNotificationChannel(channel); var retrievedChannel = AGNotificationManager.GetNotificationChannel(channel.Id); var retrievedGroup = AGNotificationManager.GetNotificationChannelGroup(group.Id); var msg = "Channel created: " + retrievedChannel + ", with group: " + retrievedGroup; Debug.Log(msg); _resultText.text = msg; _lastChannelId = channel.Id; }
public void CreateNotificationChannelGroup() { if (NotificationChannelsApiCheck()) { return; } var group = new NotificationChannelGroup(_groupIdInputField.text, RandomName()) { Description = "Android-Goodies test notification channel group" }; AGNotificationManager.CreateNotificationChannelGroup(group); var channelGroup = AGNotificationManager.GetNotificationChannelGroup(group.Id); Debug.Log("Channel group: " + channelGroup); _lastGroupId = group.Id; }