小编Eds*_*eis的帖子

FCM onReceivedMessage() 获取 Bundle

结构链接

我正在尝试从我的 ArrayMap 获取消息,但我无法访问 ReceiveMessage 包。我试图直接访问Map,但是很错误

我的代码

public class FbService extends FirebaseMessagingService {
    public FbService() {
    }

    @Override
    public void onMessageReceived(RemoteMessage remoteMessage) {
        // TODO(developer): Handle FCM messages here.
        // If the application is in the foreground handle both data and notification messages here.
        // Also if you intend on generating your own notifications as a result of a received FCM
        // message, here is where that should be initiated. See sendNotification method below.

        Map<String, String> params = remoteMessage.getData();
        String …
Run Code Online (Sandbox Code Playgroud)

android firebase firebase-cloud-messaging

3
推荐指数
1
解决办法
3418
查看次数