private void GetNotifyHandler(AndroidNotificationIntentData data) { if (this.receiveCallback != null) { this.receiveCallback(data.Id); } this.ProcessNotifyList.Remove(data.Id); }
Dictionary <string, object> GetNotificationIntentData(AndroidNotificationIntentData data) { return(data == null ? null : new Dictionary <string, object> { ["id"] = data.Id, ["channel"] = data.Channel, ["title"] = data.Notification.Title, ["text"] = data.Notification.Text, ["firetime"] = data.Notification.FireTime, }); }
void OnNotificationReceivedHandler(AndroidNotificationIntentData notificationIntentData) { m_LOGGER .Orange($"[{DateTime.Now.ToString("HH:mm:ss.ffffff")}] Received notification") .Orange($"Id: {notificationIntentData.Id}", 1) .Orange($"Channel: {notificationIntentData.Channel}", 1) .Properties(notificationIntentData.Notification, 1); if (notificationIntentData.Id == notificationExplicidID) { notificationExplicidID = 0; } }
private void OnNotificationReceived(AndroidNotificationIntentData data) { var msg = "Notification received : " + data.Id + "\n"; msg += "\n Notification received: "; msg += "\n .Title: " + data.Notification.Title; msg += "\n .Body: " + data.Notification.Text; msg += "\n .Channel: " + data.Channel; Log(msg); Debug.Log(msg); // NOTE(JJO): 알림 온 것을 눌러서 게임을 실행해도 알림이 지워지지 않을 것이므로 Callback에서 지워야 함. AndroidNotificationCenter.CancelNotification(data.Id); }
private void OnReceived(AndroidNotificationIntentData data) { UnSubscribeForNotifications(); var msg = "Notification received : " + data.Id + "\n"; msg += "\n Notification received: "; msg += "\n .Title: " + data.Notification.Title; msg += "\n .Body: " + data.Notification.Text; msg += "\n .Channel: " + data.Channel; Debug.Log(msg); isReady = true; OnReady?.Invoke(); OnReady = null; }
private void HandleLastNotificationIntent() { AndroidNotificationIntentData notificationIntentData = AndroidNotificationCenter.GetLastNotificationIntent(); if (notificationIntentData != null) { m_LOGGER .Green($"Notification found:", 1) .Orange($"Id: {notificationIntentData.Id}", 1) .Orange($"Channel: {notificationIntentData.Channel}", 1) .Properties(notificationIntentData.Notification, 1); } else { m_LOGGER.Red("Notification not found!", 1); } }
// Event handler for receiving local notifications. private void OnLocalNotificationReceived(AndroidNotificationIntentData data) { // Create a new AndroidGameNotification out of the delivered notification, but only // if the event is registered NotificationReceived?.Invoke(new AndroidGameNotification(data.Notification, data.Id, data.Channel)); }
private void CheckIntentData() { AndroidNotificationIntentData data = AndroidNotificationCenter.GetLastNotificationIntent(); }
private void AndroidNotificationCenter_OnNotificationReceived(AndroidNotificationIntentData data) { AndroidNotificationCenter.CancelNotification(data.Id); }
private void NotificationReceivedCallback(AndroidNotificationIntentData data) { AndroidNotificationCenter.CancelAllDisplayedNotifications(); AndroidNotificationCenter.OnNotificationReceived -= NotificationReceivedCallback; }
private void ReceivedNotificationHandler(AndroidNotificationIntentData data) { throw new System.NotImplementedException(); }
public void OnNotificationReceived(AndroidNotificationIntentData data) { RecordEvent("notification-received", new Dictionary <string, object> { ["notification"] = GetNotificationIntentData(data) }); }
public void OnReceiveNotification(AndroidNotificationIntentData data) { ++receivedNotificationCount; lastNotification = data; }