- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
31 lines
1.2 KiB
Java
31 lines
1.2 KiB
Java
package com.ea.eadp.pushnotification.forwarding;
|
|
|
|
import android.content.ComponentName;
|
|
import android.content.Intent;
|
|
import com.ea.nimble.ApplicationEnvironment;
|
|
import com.ea.nimble.pushtng.PushNotification;
|
|
import com.google.firebase.messaging.FirebaseMessagingService;
|
|
import com.google.firebase.messaging.RemoteMessage;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class FCMMessageReceiver extends FirebaseMessagingService {
|
|
@Override // com.google.firebase.messaging.FirebaseMessagingService
|
|
public final void onMessageReceived(RemoteMessage remoteMessage) {
|
|
ComponentName componentName = new ComponentName(getApplicationContext().getPackageName(), getIntentServiceName());
|
|
Intent intent = remoteMessage.toIntent();
|
|
intent.setComponent(componentName);
|
|
FCMMessageService.enqueueWork(getApplicationContext(), getIntentServiceName(), intent);
|
|
}
|
|
|
|
@Override // com.google.firebase.messaging.FirebaseMessagingService
|
|
public final void onNewToken(String str) {
|
|
if (ApplicationEnvironment.isMainApplicationActive()) {
|
|
PushNotification.getComponent().updateToken(str);
|
|
}
|
|
}
|
|
|
|
public String getIntentServiceName() {
|
|
return FCMMessageService.class.getName();
|
|
}
|
|
}
|