ApsAlert.Builder

public static class ApsAlert.Builder extends Object

Public Method Summary

ApsAlert.Builder
addAllLocalizationArgs(List<String> args)
Adds a list of resource keys that will be used in place of the format specifiers in bodyLocKey.
ApsAlert.Builder
addAllTitleLocArgs(List<String> args)
Adds a list of resource keys that will be used in place of the format specifiers in titleLocKey.
ApsAlert.Builder
addLocalizationArg(String arg)
Adds a resource key string that will be used in place of the format specifiers in bodyLocKey.
ApsAlert.Builder
addTitleLocalizationArg(String arg)
Adds a resource key string that will be used in place of the format specifiers in titleLocKey.
ApsAlert
build()
Creates a new ApsAlert instance from the parameters set on this builder.
ApsAlert.Builder
setActionLocalizationKey(String actionLocKey)
Sets the key of the text in the app's string resources to use to localize the action button text.
ApsAlert.Builder
setBody(String body)
Sets the body of the alert.
ApsAlert.Builder
setLaunchImage(String launchImage)
Sets the launch image for the notification action.
ApsAlert.Builder
setLocalizationKey(String locKey)
Sets the key of the body string in the app's string resources to use to localize the body text.
ApsAlert.Builder
setTitle(String title)
Sets the title of the alert.
ApsAlert.Builder
setTitleLocalizationKey(String titleLocKey)
Sets the key of the title string in the app's string resources to use to localize the title text.

Inherited Method Summary

Public Methods

public ApsAlert.Builder addAllLocalizationArgs (List<String> args)

Adds a list of resource keys that will be used in place of the format specifiers in bodyLocKey.

Parameters
args List of resource key strings.
Returns
  • This builder.

public ApsAlert.Builder addAllTitleLocArgs (List<String> args)

Adds a list of resource keys that will be used in place of the format specifiers in titleLocKey.

Parameters
args List of resource key strings.
Returns
  • This builder.

public ApsAlert.Builder addLocalizationArg (String arg)

Adds a resource key string that will be used in place of the format specifiers in bodyLocKey.

Parameters
arg Resource key string.
Returns
  • This builder.

public ApsAlert.Builder addTitleLocalizationArg (String arg)

Adds a resource key string that will be used in place of the format specifiers in titleLocKey.

Parameters
arg Resource key string.
Returns
  • This builder.

public ApsAlert build ()

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

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

public ApsAlert.Builder setActionLocalizationKey (String actionLocKey)

Sets the key of the text in the app's string resources to use to localize the action button text.

Parameters
actionLocKey Resource key string.
Returns
  • This builder.

public ApsAlert.Builder setBody (String body)

Sets the body of the alert. When provided, overrides the body sent via Notification.

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

public ApsAlert.Builder setLaunchImage (String launchImage)

Sets the launch image for the notification action.

Parameters
launchImage An image file name.
Returns
  • This builder.

public ApsAlert.Builder setLocalizationKey (String locKey)

Sets the key of the body string in the app's string resources to use to localize the body text.

Parameters
locKey Resource key string.
Returns
  • This builder.

public ApsAlert.Builder setTitle (String title)

Sets the title of the alert. When provided, overrides the title sent via Notification.

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

public ApsAlert.Builder setTitleLocalizationKey (String titleLocKey)

Sets the key of the title string in the app's string resources to use to localize the title text.

Parameters
titleLocKey Resource key string.
Returns
  • This builder.

Send feedback about...

Need help? Visit our support page.