Skip to content
This repository was archived by the owner on Dec 30, 2024. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update FirebaseMessagingSnippets
  • Loading branch information
lahirumaramba committed Dec 14, 2020
commit 6b74dc9bf486bf37d030ad6e4ec45ff0a71f4231
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ public void sendToCondition() throws Exception {

// See documentation on defining a message payload.
Message message = Message.builder()
.setNotification(new Notification(
"$GOOG up 1.43% on the day",
"$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day."))
.setNotification(Notification.builder()
.setTitle("$GOOG up 1.43% on the day")
.setBody("$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day.")
.build())
.setCondition(condition)
.build();

Expand Down Expand Up @@ -165,9 +166,10 @@ public Message webpushMessage() {
public Message allPlatformsMessage() {
// [START multi_platforms_message]
Message message = Message.builder()
.setNotification(new Notification(
"$GOOG up 1.43% on the day",
"$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day."))
.setNotification(Notification.builder()
.setTitle("$GOOG up 1.43% on the day")
.setTitle("$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day.")
.build())
.setAndroidConfig(AndroidConfig.builder()
.setTtl(3600 * 1000)
.setNotification(AndroidNotification.builder()
Expand Down