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

Commit 4d00a3b

Browse files
committed
Minor updates based on code review feedback
1 parent 700af66 commit 4d00a3b

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

admin/src/main/java/com/google/firebase/example/FirebaseMessagingSnippets.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ public class FirebaseMessagingSnippets {
3535
public void sendToToken() throws Exception {
3636
// [START send_to_token]
3737
// This registration token comes from the client FCM SDKs.
38-
String registrationToken = "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...";
38+
String registrationToken = "YOUR_REGISTRATION_TOKEN";
3939

40-
// See the "Defining the message" section below for details
41-
// on how to define a message payload.
40+
// See documentation on defining a message payload.
4241
Message message = Message.builder()
4342
.putData("score", "850")
4443
.putData("time", "2:45")
@@ -58,8 +57,7 @@ public void sendToTopic() throws Exception {
5857
// The topic name can be optionally prefixed with "/topics/".
5958
String topic = "highScores";
6059

61-
// See the "Defining the message" section below for details
62-
// on how to define a message payload.
60+
// See documentation on defining a message payload.
6361
Message message = Message.builder()
6462
.putData("score", "850")
6563
.putData("time", "2:45")
@@ -79,8 +77,7 @@ public void sendToCondition() throws Exception {
7977
// to either the Google stock or the tech industry topics.
8078
String condition = "'stock-GOOG' in topics || 'industry-tech' in topics";
8179

82-
// See the "Defining the message" section below for details
83-
// on how to define a message payload.
80+
// See documentation on defining a message payload.
8481
Message message = Message.builder()
8582
.setNotification(new Notification(
8683
"$GOOG up 1.43% on the day",
@@ -194,9 +191,9 @@ public void subscribeToTopic() throws Exception {
194191
// [START subscribe]
195192
// These registration tokens come from the client FCM SDKs.
196193
List<String> registrationTokens = Arrays.asList(
197-
"bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
194+
"YOUR_REGISTRATION_TOKEN_1",
198195
// ...
199-
"ecupwIfBy1w:APA91bFtuMY7MktgxA3Au_Qx7cKqnf..."
196+
"YOUR_REGISTRATION_TOKEN_n"
200197
);
201198

202199
// Subscribe the devices corresponding to the registration tokens to the
@@ -214,9 +211,9 @@ public void unsubscribeFromTopic() throws Exception {
214211
// [START unsubscribe]
215212
// These registration tokens come from the client FCM SDKs.
216213
List<String> registrationTokens = Arrays.asList(
217-
"bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
214+
"YOUR_REGISTRATION_TOKEN_1",
218215
// ...
219-
"ecupwIfBy1w:APA91bFtuMY7MktgxA3Au_Qx7cKqnf..."
216+
"YOUR_REGISTRATION_TOKEN_n"
220217
);
221218

222219
// Unsubscribe the devices corresponding to the registration tokens from

0 commit comments

Comments
 (0)