예제 #1
0
    void OnRegisteredForPushNotifications(string token)
    {
        tokenString = token;
        hwidString  = Pushwoosh.Instance.HWID;

        Debug.Log(token);
        Debug.Log("HWID: " + Pushwoosh.Instance.HWID);
        Debug.Log("PushToken: " + Pushwoosh.Instance.PushToken);

        Pushwoosh.Instance.GetTags((IDictionary <string, object> tags, PushwooshException error) => {
            string json = PushwooshUtils.DictionaryToJson(tags);
            Debug.Log("Tags: " + json);
        });
    }
    void onTagsReceived(string json)
    {
        GetTagsHandler handler = tagsHandlers.Dequeue();

        if (handler != null)
        {
            try {
                IDictionary <string, object> tags = PushwooshUtils.JsonToDictionary(json);
                handler(tags, null);
            }
            catch (Exception e) {
                Debug.Log("Invalid tags: " + e.ToString());
                handler(null, new PushwooshException(e.Message));
            }
        }
    }
예제 #3
0
    public virtual void PostEvent(string eventId, IDictionary <string, object> attributes)
    {
        string attributesJson = PushwooshUtils.DictionaryToJson(attributes);

        PostEventInternal(eventId, attributesJson);
    }