public override void PostLocalNotification(string title, string text, int id, IDictionary <string, string> userData, string notificationProfile, int badgeNumber, ICollection <Button> buttons) { try { using (AndroidJavaClass manager = new AndroidJavaClass("universal.tools.notifications.Manager")) { manager.CallStatic("postNotification", ToBase64(title), ToBase64(text), id, ToBase64(ToString(JsonUtils.ToJson(userData))), notificationProfile, badgeNumber, ToBase64(ToString(JsonUtils.ToJson(buttons)))); } } catch (AndroidJavaException e) { Debug.LogException(e); } }
public override void ScheduleNotificationRepeating(int firstTriggerInSeconds, int intervalSeconds, string title, string text, int id, IDictionary <string, string> userData, string notificationProfile, int badgeNumber, ICollection <Button> buttons) { try { using (AndroidJavaClass manager = new AndroidJavaClass("universal.tools.notifications.Manager")) { manager.CallStatic("scheduleNotificationRepeating", firstTriggerInSeconds, intervalSeconds, ToBase64(title), ToBase64(text), id, ToBase64(ToString(JsonUtils.ToJson(userData))), notificationProfile, badgeNumber, ToBase64(ToString(JsonUtils.ToJson(buttons)))); } } catch (AndroidJavaException e) { Debug.LogException(e); } }
public override void ScheduleNotification(int triggerInSeconds, string title, string text, int id, IDictionary <string, string> userData, string notificationProfile, int badgeNumber, ICollection <Button> buttons) { try { using (AndroidJavaClass androidJavaClass = new AndroidJavaClass("universal.tools.notifications.Manager")) { androidJavaClass.CallStatic("scheduleNotification", triggerInSeconds, ToBase64(title), ToBase64(text), id, ToBase64(ToString(JsonUtils.ToJson(userData))), notificationProfile, badgeNumber, ToBase64(ToString(JsonUtils.ToJson(buttons)))); } } catch (AndroidJavaException exception) { UnityEngine.Debug.LogException(exception); } }