Package com.batch.android
Interface PushRegistrationProvider
-
- All Known Implementing Classes:
FCMAbstractRegistrationProvider,FCMInstanceIdRegistrationProvider,FCMTokenRegistrationProvider,GCMAbstractRegistrationProvider,GCMIidRegistrationProvider,GCMLegacyRegistrationProvider
public interface PushRegistrationProviderDefines a push notification registration provider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcheckLibraryAvailability()Is this provider implemented in the app? This is the place to check if the libraries are here at runtime and if the user enabled/disabled your provider.voidcheckServiceAvailability()Is this provider installed on the device? This is the place to check if the service is installed on the device and if its version match the feature we need.AdsIdentifierProvidergetAdsIdentifierProvider()Return the ads identifier provider associated with the push registration providerjava.lang.StringgetRegistration()Returns the registration if possible.java.lang.StringgetSenderID()Returns the Sender ID of the provider, or equivalent.java.lang.StringgetShortname()Returns the short name of the provider.
-
-
-
Method Detail
-
getSenderID
java.lang.String getSenderID()
Returns the Sender ID of the provider, or equivalent. For example: "8122930293"
-
getShortname
java.lang.String getShortname()
Returns the short name of the provider. For example: "FCM".
-
checkServiceAvailability
void checkServiceAvailability() throws PushRegistrationProviderAvailabilityExceptionIs this provider installed on the device? This is the place to check if the service is installed on the device and if its version match the feature we need.This method will be called when electing the provider for the current start of the app.
If not available, you should throw a
PushRegistrationProviderAvailabilityExceptionwith the human-readable error message.
-
checkLibraryAvailability
void checkLibraryAvailability() throws PushRegistrationProviderAvailabilityExceptionIs this provider implemented in the app? This is the place to check if the libraries are here at runtime and if the user enabled/disabled your provider.This method will be called right before requesting a push token.
If not available, you should throw a
PushRegistrationProviderAvailabilityExceptionwith the human-readable error message.
-
getRegistration
@Nullable java.lang.String getRegistration()
Returns the registration if possible. Some providers might not have it right away. Return null in these cases.
-
getAdsIdentifierProvider
AdsIdentifierProvider getAdsIdentifierProvider()
Return the ads identifier provider associated with the push registration provider- Returns:
-
-