-
public class PushRegistrationProviderFactoryFactory, giving you the adequate push registration provider according to the app setup and SDK settings
-
-
Constructor Summary
Constructors Constructor Description PushRegistrationProviderFactory(Context context)
-
Method Summary
Modifier and Type Method Description PushRegistrationProvidergetRegistrationProvider()Get the registration provider. PushRegistrationProvidergetExternalPushRegistrationProvider()Try to get an external push provider booleanisExternalProviderAllowed(@NonNull() String shortname)Check if the given push provider short name is allowed -
-
Constructor Detail
-
PushRegistrationProviderFactory
PushRegistrationProviderFactory(Context context)
-
-
Method Detail
-
getRegistrationProvider
@Nullable() PushRegistrationProvider getRegistrationProvider()
Get the registration provider.
This method only support FCM Token provider or external push provider (like our hms plugin).
A provider's decision is final. If it then fails its availability check, another provider will NOT be picked.Thus, looking at the manifest to take this decision isn't the Provider's responsibility, but this Factory's.To avoid unnecessary work, providers assume that they have been instantiated through this factory,and will not check the manifest for their receiver.
-
getExternalPushRegistrationProvider
PushRegistrationProvider getExternalPushRegistrationProvider()
Try to get an external push provider
-
isExternalProviderAllowed
boolean isExternalProviderAllowed(@NonNull() String shortname)
Check if the given push provider short name is allowed
- Parameters:
shortname- Push provider shortname
-
-
-
-