Interface PushRegistrationProvider
- 
 
 public interface PushRegistrationProviderA provider which will offer a higher level of abstraction compared to the PushRegistrationService
 You can create an instance of PushRegistrationProvider like this:
 import com.zendesk.sdk.network.PushRegistrationProvider; import com.zendesk.sdk.network.impl.ZendeskConfig; ... PushRegistrationProvider provider = ZendeskConfig.INSTANCE.provider().pushRegistrationProvider(); ...
 Once you have an instance of the provider you can call methods on it and handle the results in callbacks. A success callback will give you the resource(s) that you are requesting, like the result of registering for and un-registering from push. The error callback will be called if there was some issue with the method call and it will define details about the error in an ErrorResponseFor example you can register the device for push notifications like this: provider.registerDeviceWithIdentifier("push-token", Locale.getDefault(), new ZendeskCallback<PushRegistrationResponse>() { @Override public void onSuccess(PushRegistrationResponse pushRegistrationResponse) { // Handle success } @Override public void onError(ErrorResponse errorResponse) { // Handle error } });
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidregisterDeviceWithIdentifier(java.lang.String identifier, java.util.Locale locale, <any> callback)Calls a push registration service to register a given identifier to receive push notifications.voidregisterDeviceWithUAChannelId(java.lang.String urbanAirshipChannelId, java.util.Locale locale, <any> callback)Calls a push registration service to register a given Urban Airship channel id to receive push notifications.voidunregisterDevice(java.lang.String identifier, <any> callback)Calls a push registration service to unregister a device to receive push notifications.
 
- 
- 
- 
Method Detail- 
registerDeviceWithIdentifiervoid registerDeviceWithIdentifier(java.lang.String identifier, java.util.Locale locale, <any> callback)Calls a push registration service to register a given identifier to receive push notifications.This method stores the PushRegistrationResponseto disk on successful registration. Subsequent calls to this method with the sameidentifierwill return early, passing the storedPushRegistrationResponsetoZendeskCallback#onSuccess(Object), and will not make any calls to the network.Calling this method with a different identifierwill remove any storedPushRegistrationResponsefrom storage.- Parameters:
- identifier- The device identifier
- locale- The preferred device locale
- callback- Callback that will deliver a newly created device configuration- PushRegistrationResponseor- ErrorResponse
- Since:
- 1.4.0.1
 
 - 
registerDeviceWithUAChannelIdvoid registerDeviceWithUAChannelId(java.lang.String urbanAirshipChannelId, java.util.Locale locale, <any> callback)Calls a push registration service to register a given Urban Airship channel id to receive push notifications.This method stores the PushRegistrationResponseto disk on successful registration. Subsequent calls to this method with the sameidentifierwill return early, passing the storedPushRegistrationResponsetoZendeskCallback#onSuccess(Object), and will not make any calls to the network.Calling this method with a different identifierwill remove any storedPushRegistrationResponsefrom storage.- Parameters:
- urbanAirshipChannelId- The UrbanAirship channel identifier
- locale- The preferred device locale
- callback- Callback that will deliver a newly created device configuration- PushRegistrationResponseor- ErrorResponse
- Since:
- 1.4.0.1
 
 - 
unregisterDevicevoid unregisterDevice(java.lang.String identifier, <any> callback)Calls a push registration service to unregister a device to receive push notifications. This will also remove any storedPushRegistrationResponseon the device.- Parameters:
- identifier- The device identifier
- callback- Callback that will deliver a- Voidor- ErrorResponse
- Since:
- 1.2.0.1
 
 
- 
 
-