36 lines
989 B
Java
36 lines
989 B
Java
package com.juce;
|
|
|
|
import com.google.firebase.messaging.*;
|
|
|
|
public final class JuceFirebaseMessagingService extends FirebaseMessagingService
|
|
{
|
|
private native void firebaseRemoteMessageReceived (RemoteMessage message);
|
|
private native void firebaseRemoteMessagesDeleted();
|
|
private native void firebaseRemoteMessageSent (String messageId);
|
|
private native void firebaseRemoteMessageSendError (String messageId, String error);
|
|
|
|
@Override
|
|
public void onMessageReceived (RemoteMessage message)
|
|
{
|
|
firebaseRemoteMessageReceived (message);
|
|
}
|
|
|
|
@Override
|
|
public void onDeletedMessages()
|
|
{
|
|
firebaseRemoteMessagesDeleted();
|
|
}
|
|
|
|
@Override
|
|
public void onMessageSent (String messageId)
|
|
{
|
|
firebaseRemoteMessageSent (messageId);
|
|
}
|
|
|
|
@Override
|
|
public void onSendError (String messageId, Exception e)
|
|
{
|
|
firebaseRemoteMessageSendError (messageId, e.toString());
|
|
}
|
|
}
|