Interface FCMRegistrationService
- All Known Implementing Classes:
SuperUserFCMRegistrationService
,UserFCMRegistrationService
public interface FCMRegistrationService
Manages instance of
FCMRegistration
. This provides methods to create, update, and delete registrations
with the Firebase Notification Service.-
Method Summary
Modifier and TypeMethodDescriptioncreateRegistration
(FCMRegistration fcmRegistration) Creates a new instance ofFCMRegistration
.void
deleteRegistration
(String fcmRegistrationId) Delets an instance ofFCMRegistration
based on the supplied ID.updateRegistration
(FCMRegistration fcmRegistration) Updates an existing instance ofFCMRegistration
.
-
Method Details
-
createRegistration
Creates a new instance ofFCMRegistration
. In addition to ensuring the token has been written to the database, this may perform any other actions necessary such as subscribing the token to a specific topic.- Parameters:
fcmRegistration
- the instance ofFCMRegistration
- Returns:
- the
FCMRegistration
instance as it was written to the database
-
updateRegistration
Updates an existing instance ofFCMRegistration
. In addition to ensuring the token has been written to the database, this may perform any other actions necessary such as subscribing the token to a specific topic or refreshing an existing registration.- Parameters:
fcmRegistration
- the instance ofFCMRegistration
- Returns:
- the
FCMRegistration
instance as it was written to the database
-
deleteRegistration
Delets an instance ofFCMRegistration
based on the supplied ID. The ID can be obtained byFCMRegistration.getId()
. In addition to removing the registration, this may also perform other actions such as unsubscribing from necessary topics.- Parameters:
fcmRegistrationId
- as determined byFCMRegistration.getId()
-