public void FireNotificationReceivedEvent(string jsonString, GameThrive.NotificationReceived notificationReceived) { var dict = Json.Deserialize(jsonString) as Dictionary <string, object>; Dictionary <string, object> additionalData = null; if (dict.ContainsKey("custom")) { additionalData = dict["custom"] as Dictionary <string, object>; } notificationReceived((string)(dict["alert"]), additionalData, (bool)dict["isActive"]); }
public void FireNotificationReceivedEvent(string jsonString, GameThrive.NotificationReceived notificationReceived) { var dict = Json.Deserialize(jsonString) as Dictionary <string, object>; string message = (string)(dict["alertMessage"]); dict.Remove("alertMessage"); bool isActive = (bool)dict["isActive"]; dict.Remove("isActive"); notificationReceived(message, dict, isActive); }
// Doesn't apply to Windows Phone: The Callback is setup in the constructor so this is never called. public void FireNotificationReceivedEvent(string jsonString, GameThrive.NotificationReceived notificationReceived) { }