Package com.batch.android.push
Class GCMAbstractRegistrationProvider
- java.lang.Object
-
- com.batch.android.push.GCMAbstractRegistrationProvider
-
- All Implemented Interfaces:
PushRegistrationProvider
- Direct Known Subclasses:
GCMIidRegistrationProvider,GCMLegacyRegistrationProvider
public abstract class GCMAbstractRegistrationProvider extends java.lang.Object implements PushRegistrationProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete 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 providerprotected abstract java.lang.IntegergetGMSAvailability()java.lang.StringgetSenderID()Returns the Sender ID of the provider, or equivalent.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.batch.android.PushRegistrationProvider
getRegistration, getShortname
-
-
-
-
Method Detail
-
getSenderID
public java.lang.String getSenderID()
Description copied from interface:PushRegistrationProviderReturns the Sender ID of the provider, or equivalent. For example: "8122930293"- Specified by:
getSenderIDin interfacePushRegistrationProvider
-
checkServiceAvailability
public void checkServiceAvailability() throws PushRegistrationProviderAvailabilityExceptionDescription copied from interface:PushRegistrationProviderIs 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.- Specified by:
checkServiceAvailabilityin interfacePushRegistrationProvider- Throws:
PushRegistrationProviderAvailabilityException
-
checkLibraryAvailability
public void checkLibraryAvailability() throws PushRegistrationProviderAvailabilityExceptionDescription copied from interface:PushRegistrationProviderIs 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.- Specified by:
checkLibraryAvailabilityin interfacePushRegistrationProvider- Throws:
PushRegistrationProviderAvailabilityException
-
getAdsIdentifierProvider
public AdsIdentifierProvider getAdsIdentifierProvider()
Description copied from interface:PushRegistrationProviderReturn the ads identifier provider associated with the push registration provider- Specified by:
getAdsIdentifierProviderin interfacePushRegistrationProvider- Returns:
-
getGMSAvailability
protected abstract java.lang.Integer getGMSAvailability()
-
-