示例#1
0
    private void suscribeTopic(String topicName)
    {
        KiiTopic topic = Kii.Topic(topicName);

        Debug.Log("#####Subscribe");
        KiiUser.CurrentUser.PushSubscription.Subscribe(topic, (KiiSubscribable subscribable, Exception e6) => {
            Debug.Log("#####callback Subscribe");
            if (e6 != null)
            {
                if (e6 is ConflictException)
                {
                    Debug.Log("Topic is already subscribed" + "\n");
                    Debug.Log("Push is ready");
                    Debug.Log("#####all setup success!!!!!!");
                    return;
                }
                Debug.Log("#####failed to Subscribe");
                this.ShowException("Failed to subscribe bucket", e6);
                return;
            }
            else
            {
                Debug.Log("Push is ready");
                Debug.Log("#####all setup success!!!!!!");
            }
        });
    }