public class KinveyFCMService
Firebase Messaging Service responsible for handling FCM messages.
To use FCM for push notifications, extend this class and implement the provided abstract methods. When FCM related events occur, they relevant method will be called by the library.
Modifier and Type | Class and Description |
---|---|
static class |
KinveyFCMService.Companion |
Modifier and Type | Field and Description |
---|---|
static KinveyFCMService.Companion |
Companion |
static java.lang.String |
MESSAGE_FROM_FCM |
static java.lang.String |
REG_ID |
static java.lang.String |
TAG |
static java.lang.String |
TRIGGER |
Constructor and Description |
---|
KinveyFCMService()
Firebase Messaging Service responsible for handling FCM messages.
|
Modifier and Type | Method and Description |
---|---|
void |
onMessage(java.lang.String r) |
void |
onMessageReceived(com.google.firebase.messaging.RemoteMessage remoteMessage)
Called when message is received.
|
void |
onNewToken(java.lang.String token)
Persist token to third-party servers.
|
public static java.lang.String MESSAGE_FROM_FCM
public static java.lang.String TAG
public static java.lang.String TRIGGER
public static java.lang.String REG_ID
public static KinveyFCMService.Companion Companion
public KinveyFCMService()
Firebase Messaging Service responsible for handling FCM messages.
To use FCM for push notifications, extend this class and implement the provided abstract methods. When FCM related events occur, they relevant method will be called by the library.
public void onMessageReceived(com.google.firebase.messaging.RemoteMessage remoteMessage)
Called when message is received.
remoteMessage
- Object representing the message received from Firebase Cloud Messaging.public void onMessage(java.lang.String r)
public void onNewToken(java.lang.String token)
Persist token to third-party servers.
Modify this method to associate the user's FCM InstanceID token with any server-side account maintained by your application.
token
- The new token.