-
- All Implemented Interfaces:
-
com.batch.android.PushRegistrationProvider
public abstract class FCMAbstractRegistrationProvider implements PushRegistrationProvider
-
-
Method Summary
Modifier and Type Method Description StringgetSenderID()Returns the Sender ID of the provider, or equivalent. StringfetchSenderID(Context context)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 versionmatch the feature we need. voidcheckLibraryAvailability()Is this provider implemented in the app?This is the place to check if the libraries are here at runtime andif the user enabled/disabled your provider. static booleanisFirebaseMessagingPresent()-
-
Method Detail
-
getSenderID
String getSenderID()
Returns the Sender ID of the provider, or equivalent. For example: "8122930293"
-
fetchSenderID
String fetchSenderID(Context context)
-
checkServiceAvailability
void checkServiceAvailability()
Is this provider installed on the device?This is the place to check if the service is installed on the device and if its versionmatch 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 PushRegistrationProviderAvailabilityException withthe human-readable error message.
-
checkLibraryAvailability
void checkLibraryAvailability()
Is this provider implemented in the app?This is the place to check if the libraries are here at runtime andif the user enabled/disabled your provider.
This method will be called right before requesting a push token.
If not available, you should throw a PushRegistrationProviderAvailabilityException withthe human-readable error message.
-
isFirebaseMessagingPresent
static boolean isFirebaseMessagingPresent()
-
-
-
-