@@ -35,10 +35,9 @@ public class FirebaseMessagingSnippets {
35
35
public void sendToToken () throws Exception {
36
36
// [START send_to_token]
37
37
// This registration token comes from the client FCM SDKs.
38
- String registrationToken = "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1... " ;
38
+ String registrationToken = "YOUR_REGISTRATION_TOKEN " ;
39
39
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.
42
41
Message message = Message .builder ()
43
42
.putData ("score" , "850" )
44
43
.putData ("time" , "2:45" )
@@ -58,8 +57,7 @@ public void sendToTopic() throws Exception {
58
57
// The topic name can be optionally prefixed with "/topics/".
59
58
String topic = "highScores" ;
60
59
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.
63
61
Message message = Message .builder ()
64
62
.putData ("score" , "850" )
65
63
.putData ("time" , "2:45" )
@@ -79,8 +77,7 @@ public void sendToCondition() throws Exception {
79
77
// to either the Google stock or the tech industry topics.
80
78
String condition = "'stock-GOOG' in topics || 'industry-tech' in topics" ;
81
79
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.
84
81
Message message = Message .builder ()
85
82
.setNotification (new Notification (
86
83
"$GOOG up 1.43% on the day" ,
@@ -194,9 +191,9 @@ public void subscribeToTopic() throws Exception {
194
191
// [START subscribe]
195
192
// These registration tokens come from the client FCM SDKs.
196
193
List <String > registrationTokens = Arrays .asList (
197
- "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1... " ,
194
+ "YOUR_REGISTRATION_TOKEN_1 " ,
198
195
// ...
199
- "ecupwIfBy1w:APA91bFtuMY7MktgxA3Au_Qx7cKqnf... "
196
+ "YOUR_REGISTRATION_TOKEN_n "
200
197
);
201
198
202
199
// Subscribe the devices corresponding to the registration tokens to the
@@ -214,9 +211,9 @@ public void unsubscribeFromTopic() throws Exception {
214
211
// [START unsubscribe]
215
212
// These registration tokens come from the client FCM SDKs.
216
213
List <String > registrationTokens = Arrays .asList (
217
- "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1... " ,
214
+ "YOUR_REGISTRATION_TOKEN_1 " ,
218
215
// ...
219
- "ecupwIfBy1w:APA91bFtuMY7MktgxA3Au_Qx7cKqnf... "
216
+ "YOUR_REGISTRATION_TOKEN_n "
220
217
);
221
218
222
219
// Unsubscribe the devices corresponding to the registration tokens from
0 commit comments