forked from dpa99c/cordova-plugin-firebasex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FirebasePluginMessageReceiver.java
28 lines (22 loc) · 1.01 KB
/
FirebasePluginMessageReceiver.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package org.apache.cordova.firebase;
import android.os.Bundle;
import com.google.firebase.messaging.RemoteMessage;
public abstract class FirebasePluginMessageReceiver {
public FirebasePluginMessageReceiver() {
FirebasePluginMessageReceiverManager.register(this);
}
/**
* Concrete subclasses should override this and return true if they handle the received message.
*
* @param remoteMessage
* @return true if the received message was handled by the receiver so should not be handled by FirebasePluginMessagingService.onMessageReceived()
*/
public abstract boolean onMessageReceived(RemoteMessage remoteMessage);
/**
* Concrete subclasses should override this and return true if they handle the message bundle before it's sent to FirebasePlugin.sendMessage().
*
* @param bundle
* @return true if the received bundle was handled by the receiver so should not be handled by FirebasePlugin.
*/
public abstract boolean sendMessage(Bundle bundle);
}