Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Receiver side for marking messages as delivered.
//Receiver Side
public class FirebaseMessagingServiceEx extends FirebaseMessagingService {
public void onMessageReceived(RemoteMessage remoteMessage) {
try {
JSONObject sendBird = new JSONObject(remoteMessage.getData().get("sendbird"));
JSONObject channel = (JSONObject) sendBird.get("channel");
String channelUrl = (String) channel.get("channel_url");
//Mark the Message as Delivered
} catch (JSONException e) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment