public static class

Aps.Builder

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

Summary

Public Methods
Aps build()
Aps.Builder setAlert(ApsAlert alert)
Sets the alert as a dictionary.
Aps.Builder setAlert(String alert)
Sets the alert field as a string.
Aps.Builder setBadge(int badge)
Sets the badge to be displayed with the message.
Aps.Builder setCategory(String category)
Sets the notification type.
Aps.Builder setContentAvailable(boolean contentAvailable)
Specifies whether to configure a background update notification.
Aps.Builder setSound(String sound)
Sets the sound to be played with the message.
Aps.Builder setThreadId(String threadId)
Sets an app-specific identifier for grouping notifications.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public Aps build ()

public Aps.Builder setAlert (ApsAlert alert)

Sets the alert as a dictionary.

Parameters
alert An instance of ApsAlert.
Returns
  • This builder.

public Aps.Builder setAlert (String alert)

Sets the alert field as a string.

Parameters
alert A string alert.
Returns
  • This builder.

public Aps.Builder setBadge (int badge)

Sets the badge to be displayed with the message. Set to 0 to remove the badge. When not invoked, the badge will remain unchanged.

Parameters
badge An integer representing the badge.
Returns
  • This builder.

public Aps.Builder setCategory (String category)

Sets the notification type.

Parameters
category A string identifier.
Returns
  • This builder.

public Aps.Builder setContentAvailable (boolean contentAvailable)

Specifies whether to configure a background update notification.

Parameters
contentAvailable True to perform a background update.
Returns
  • This builder.

public Aps.Builder setSound (String sound)

Sets the sound to be played with the message.

Parameters
sound Sound file name or "default".
Returns
  • This builder.

public Aps.Builder setThreadId (String threadId)

Sets an app-specific identifier for grouping notifications.

Parameters
threadId A string identifier.
Returns
  • This builder.