public static class

Notification.Builder

extends Object
java.lang.Object
   ↳ com.google.firebase.messaging.Notification.Builder

Summary

Public Methods
Notification build()
Creates a new Notification instance from the parameters set on this builder.
Notification.Builder setBody(String body)
Sets the body of the notification.
Notification.Builder setImage(String imageUrl)
Sets the URL of the image that is going to be displayed in the notification.
Notification.Builder setTitle(String title)
Sets the title of the notification.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public Notification build ()

Creates a new Notification instance from the parameters set on this builder.

Returns
Throws
IllegalArgumentException If any of the parameters set on the builder are invalid.

public Notification.Builder setBody (String body)

Sets the body of the notification.

Parameters
body Body of the notification.
Returns
  • This builder.

public Notification.Builder setImage (String imageUrl)

Sets the URL of the image that is going to be displayed in the notification.

Parameters
imageUrl URL of the image that is going to be displayed in the notification.
Returns
  • This builder.

public Notification.Builder setTitle (String title)

Sets the title of the notification.

Parameters
title Title of the notification.
Returns
  • This builder.