Package com.batch.android.push
Class FCMAbstractRegistrationProvider
- java.lang.Object
-
- com.batch.android.push.FCMAbstractRegistrationProvider
-
- All Implemented Interfaces:
PushRegistrationProvider
- Direct Known Subclasses:
FCMInstanceIdRegistrationProvider,FCMTokenRegistrationProvider
public abstract class FCMAbstractRegistrationProvider extends java.lang.Object implements PushRegistrationProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected GCMAdsIdentifierProvideradsIdentifierProviderprotected java.lang.StringsenderID
-
Method Summary
All Methods Static Methods Instance 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.java.lang.StringfetchSenderID(android.content.Context context)AdsIdentifierProvidergetAdsIdentifierProvider()Return the ads identifier provider associated with the push registration providerjava.lang.StringgetSenderID()Returns the Sender ID of the provider, or equivalent.static booleanisFirebaseMessagingPresent()-
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
-
-
-
-
Field Detail
-
adsIdentifierProvider
protected GCMAdsIdentifierProvider adsIdentifierProvider
-
senderID
protected java.lang.String senderID
-
-
Method Detail
-
fetchSenderID
public java.lang.String fetchSenderID(android.content.Context context)
-
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:
-
isFirebaseMessagingPresent
public static boolean isFirebaseMessagingPresent()
-
-