Class KiiPushCallBack


  • public abstract class KiiPushCallBack
    extends java.lang.Object
    • Constructor Detail

      • KiiPushCallBack

        public KiiPushCallBack()
    • Method Detail

      • onInstallCompleted

        public void onInstallCompleted​(int taskId,
                                       @Nullable
                                       java.lang.Exception e)
        Called when KiiPushInstallation.install(String, KiiPushCallBack) has completed. This would be called from UI/Main thread.
        Parameters:
        taskId - id of the task.
        e - null when succeeded.
      • onUninstallCompleted

        public void onUninstallCompleted​(int taskId,
                                         @Nullable
                                         java.lang.Exception e)
        Called when KiiPushInstallation.uninstall(String, KiiPushCallBack) has completed. This would be called from UI/Main thread.
        Parameters:
        taskId - id of the task.
        e - null when succeeded.
      • onSubscribeBucketCompleted

        public void onSubscribeBucketCompleted​(int taskId,
                                               @Nullable
                                               KiiBucket target,
                                               @Nullable
                                               java.lang.Exception e)
        Called when KiiPushSubscription.subscribeBucket(KiiBucket, KiiPushCallBack) has completed. This would be called form UI/Main thread.
        Parameters:
        taskId - id of the task.
        target - target bucket of subscription
        e - null when succeeded.
      • onUnSubscribeBucketCompleted

        public void onUnSubscribeBucketCompleted​(int taskId,
                                                 @Nullable
                                                 KiiBucket target,
                                                 @Nullable
                                                 java.lang.Exception e)
        Called when KiiPushSubscription.unsubscribeBucket(KiiBucket) has completed. This would be called from UI/Main thread.
        Parameters:
        taskId - id of the task.
        target - target bucket of unsubscription
        e - null when succeeded.
      • onUnSubscribeCompleted

        public void onUnSubscribeCompleted​(int taskId,
                                           @Nullable
                                           KiiSubscribable target,
                                           @Nullable
                                           java.lang.Exception e)
        Called when KiiPushSubscription.unsubscribe(KiiSubscribable) has completed. This would be called from UI/Main thread.
        Parameters:
        taskId - id of the task.
        target - of the subscription
        e - null when succeeded.
      • onCheckSubscriptionCompleted

        public void onCheckSubscriptionCompleted​(int taskId,
                                                 @Nullable
                                                 KiiSubscribable target,
                                                 boolean isSubscribed,
                                                 @Nullable
                                                 java.lang.Exception e)
        Called when KiiPushSubscription.isSubscribed(KiiSubscribable) has completed. This would be called from UI/Main thread.
        Parameters:
        taskId - id of the task.
        target - of the subscription
        isSubscribed - true if the target is subscribed, otherwise false.
        e - null when succeeded.
      • onTaskCancel

        public void onTaskCancel​(int taskId)
        Runs on the UI thread after the task has been canceled.
        Parameters:
        taskId - id of the task
      • onTaskStart

        public void onTaskStart​(int taskId)
        Runs on the UI thread before the task is executed.
        Parameters:
        taskId - id of the task. can be used for cancel task by executing Kii.cancelTask(int)