CustomLayoutNotificationProvider

A notification provider that allows the use of layout XML. The default binding will bind the following: - small icon to android.R.id.icon - title to android.R.id.title - summary/subtitle to android.R.id.summary - alert/message to android.R.id.message Custom binding can be applied by overriding onBindContentView.

Constructors

Link copied to clipboard
constructor(@NonNull context: Context, @NonNull configOptions: AirshipConfigOptions, @LayoutRes layoutId: Int)

Inherited properties

Link copied to clipboard
val DEFAULT_AIRSHIP_NOTIFICATION_ICON: String = "ua_default_ic_notification"
Default Airship notification icon.
Link copied to clipboard
val DEFAULT_NOTIFICATION_CHANNEL: String = "com.urbanairship.default"
Default notification channel ID.
Link copied to clipboard
Link copied to clipboard
Default Notification ID when the PushMessage defines a notification tag.

Functions

Link copied to clipboard
protected open fun onBindContentView(@NonNull contentView: RemoteViews, @NonNull arguments: NotificationArguments)
Called to bind the content view.
Link copied to clipboard
protected open fun onExtendBuilder(    @NonNull context: Context,     @NonNull builder: NotificationCompat.Builder,     @NonNull arguments: NotificationArguments): NotificationCompat.Builder
Override this method to extend the notification builder.

Inherited functions

Link copied to clipboard
Get the default accent color.
Link copied to clipboard
Get the default notification title string resource.
Link copied to clipboard
protected open fun getNextId(@NonNull context: Context, @NonNull message: PushMessage): Int
Gets the next notification Id.
Link copied to clipboard
Get the small icon drawable resource.
Link copied to clipboard
protected open fun getTitle(@NonNull context: Context, @NonNull message: PushMessage): String
Gets the notification title.
Link copied to clipboard
Called to generate the NotificationResult for a push message.
Link copied to clipboard
Called to generate the NotificationArguments for a push message.
Link copied to clipboard
open fun onNotificationCreated(@NonNull context: Context, @NonNull notification: Notification, @NonNull arguments: NotificationArguments)
Called before posting the notification.
Link copied to clipboard
open fun setDefaultAccentColor(@ColorInt accentColor: Int)
Set the default notification accent color.
Link copied to clipboard
open fun setDefaultTitle(@StringRes titleId: Int)
Set the default notification title.
Link copied to clipboard
open fun setSmallIcon(@DrawableRes smallIconId: Int)
Set the notification small icon.