java.lang.Object | |
↳ | com.vidinoti.android.vdarsdk.PushNotificationController |
Class responsible for managing the Android push notifications. It expects FCM (Firebase Cloud
Messaging). For final integration guide, see the documentation in vidinoti.github.io
The notifications must be enabled via setNotificationsSupport(boolean)
.
The application must create a FirebaseInstanceIdService class and must forward any new FCM token
to the SDK via onTokenRefresh(String)
(this is done via the publicly exposed method
updatePushNotificationToken(String)
).
When a new FCM token is received, it is sent to the backend server.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the singleton instance of the PushNotificationController
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns true if the push notifications are enabled, false otherwise.
| |||||||||||
Updates the token and send it to the server.
| |||||||||||
Sets whether the application should activate the push notifications.
| |||||||||||
Updates the notification support (sends the token to the backend server if it has not been
able to do it before.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Returns the singleton instance of the PushNotificationController
Returns true if the push notifications are enabled, false otherwise.
Updates the token and send it to the server. This method must be called by the onTokenRefresh method of the FirebaseInstanceIdService service
token | the FCM token |
---|
Sets whether the application should activate the push notifications. When enabled, the FCM token will be sent to the backend server. When disabled, we will ensure that the backend server will remove the notification if it was present before.
enabled | true for enabling the push notifications, false otherwise. |
---|
Updates the notification support (sends the token to the backend server if it has not been able to do it before.