【发布时间】:2018-07-03 06:57:17
【问题描述】:
所以现在 FirebaseInstanceIdService 服务已被弃用,我不确定用什么替换它。
我之前在清单中声明了一个服务,如下所示:
<service
android:name=".fcm.FcmIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
还有服务本身:
public class FcmIdService extends FirebaseInstanceIdService {
@Override
public void onTokenRefresh() {
// Create notification channel.
createFcmNotificationChannel();
}
}
如果我删除该服务,我将不再收到通知,所以我假设我必须用其他东西替换它。
谢谢。
编辑:这个问题与提议的重复问题不同,它还涵盖了受影响服务的清单声明,我仍然不清楚。
【问题讨论】:
-
是的,这个问题有点不同。由于链接的其他问题没有需要在清单中添加的操作
标签: android firebase firebase-cloud-messaging