Package com.kii.cloud.storage
Class JPushInstallation
- java.lang.Object
-
- com.kii.cloud.storage.KiiPushInstallation
-
- com.kii.cloud.storage.JPushInstallation
-
public class JPushInstallation extends KiiPushInstallation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.kii.cloud.storage.KiiPushInstallation
KiiPushInstallation.PushBackend
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinstall(java.lang.String registrationId)Register the id issued by JPush to the Kii cloud for current logged in user.intinstall(java.lang.String registrationId, KiiPushCallBack callback)Asynchronous call forinstall(String).voiduninstall(java.lang.String registrationId)Uninstall the push by the id(issued by JPush) that is used for installation.intuninstall(java.lang.String registrationId, KiiPushCallBack callback)Asynchronous call foruninstall(String).
-
-
-
Method Detail
-
install
@WorkerThread public void install(@NonNull java.lang.String registrationId) throws java.io.IOException, BadRequestException, UnauthorizedException, ForbiddenException, ConflictException, NotFoundException, UndefinedExceptionRegister the id issued by JPush to the Kii cloud for current logged in user. Upon registration, Kii cloud uses it to identify each device that has registered to receive messages for the application. Each time application install into a device, a new registration id is issued.
NOTE: This api access to server. Should not be executed in UI/Main thread.- Specified by:
installin classKiiPushInstallation- Parameters:
registrationId- Id that denotes the application in the particular device is registered to receive JPush message.- Throws:
java.lang.IllegalArgumentException- If registrationId is null or empty.java.lang.IllegalStateException- SDK has not initialized or No user logged in.java.io.IOException- If network related error has happened.UndefinedExceptionNotFoundExceptionForbiddenExceptionConflictExceptionBadRequestExceptionUnauthorizedException
-
install
public int install(@NonNull java.lang.String registrationId, @Nullable KiiPushCallBack callback)Asynchronous call forinstall(String). A background task will be initiated to execute the task.- Specified by:
installin classKiiPushInstallation- Parameters:
registrationId- JPush registration id for the app in the particular device.callback- Notifies event.- Returns:
- unique ID which is used to identify this async Task.
-
uninstall
@WorkerThread public void uninstall(@NonNull java.lang.String registrationId) throws java.io.IOException, BadRequestException, UnauthorizedException, ForbiddenException, ConflictException, NotFoundException, UndefinedExceptionUninstall the push by the id(issued by JPush) that is used for installation.
NOTE: This api access to server. Should not be executed in UI/Main thread.- Specified by:
uninstallin classKiiPushInstallation- Parameters:
registrationId- JPush issued Id that is used when install the push.- Throws:
java.lang.IllegalArgumentException- If registrationId is null or empty.java.lang.IllegalStateException- SDK has not initialized or No user logged in.java.io.IOException- If network related error has happened.UndefinedExceptionNotFoundException- No installation found for the provided registrationId.ForbiddenExceptionConflictExceptionBadRequestExceptionUnauthorizedException
-
uninstall
public int uninstall(@NonNull java.lang.String registrationId, @Nullable KiiPushCallBack callback)Asynchronous call foruninstall(String). A background task will be initiated to execute the task.- Specified by:
uninstallin classKiiPushInstallation- Parameters:
regId- JPush issued Id that is used when install the push.callBack- Notifies event.- Returns:
- unique ID which is used to identify this async Task.
-
-