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'