コード例 #1
0
    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"]);
    }
コード例 #2
0
    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);
    }
コード例 #3
0
 // 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)
 {
 }