-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
@hiranya911 sorry I was OOO last week, will take a look now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits but LGTM!
public void sendToToken() throws Exception { | ||
// [START send_to_token] | ||
// This registration token comes from the client FCM SDKs. | ||
String registrationToken = "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1..."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe change the constant to "YOUR_REGISTRATION_TOKEN"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
// The topic name can be optionally prefixed with "/topics/". | ||
String topic = "highScores"; | ||
|
||
// See the "Defining the message" section below for details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of referencing specific docs headers (which can change) maybe "See docs on defining a message"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
// [START subscribe] | ||
// These registration tokens come from the client FCM SDKs. | ||
List<String> registrationTokens = Arrays.asList( | ||
"bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here about fake tokens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Snippets to appear at:
https://firebase.google.com/docs/cloud-messaging/admin/send-messages
https://firebase.google.com/docs/cloud-messaging/admin/manage-topic-subscriptions