Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm following the below link to implement Firebase Messaging to send messages to multiple devices

https://firebase.google.com/docs/cloud-messaging/android/send-multiple#build_send_requests

I'm almost done with the implementation but just stuck at the last stage (Build send requests)

In the below code

Message message = Message.builder()
    .putData("score", "850")
    .putData("time", "2:45")
    .setTopic(topic)
    .build();

I'm getting the error Cannot resolve symbol 'Message'

Also in the line

String response = FirebaseMessaging.getInstance().send(message);

When I Ctrl+click the send() method, the argument message is being shown as instance of RemoteMessage and not Message with return type of void and not String

Am I missing any dependencies or is there any change in implementation in the latest library of firebase messaging?

I'm using the following (latest) Firebase version in my app level build.gradle

implementation 'com.google.firebase:firebase-messaging:19.0.1'
implementation 'com.google.firebase:firebase-core:17.0.1'
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
692 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...