Skip to content
This repository was archived by the owner on Dec 30, 2024. It is now read-only.

Java FCM API Snippets #2

Merged
merged 7 commits into from
Feb 13, 2018
Merged

Java FCM API Snippets #2

merged 7 commits into from
Feb 13, 2018

Conversation

hiranya911
Copy link
Contributor

@samtstern
Copy link
Contributor

@hiranya911 sorry I was OOO last week, will take a look now.

Copy link
Contributor

@samtstern samtstern left a 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...";
Copy link
Contributor

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"

Copy link
Contributor Author

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
Copy link
Contributor

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"

Copy link
Contributor Author

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...",
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@hiranya911 hiranya911 assigned hiranya911 and unassigned samtstern Feb 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants