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(context: Context, configOptions: AirshipConfigOptions, @LayoutRes layoutId: Int)

Inherited properties

Link copied to clipboard

The default accent color.

Link copied to clipboard

The default notification channel.

Link copied to clipboard

The default notification title string resource.

Link copied to clipboard

The large icon drawable resource.

Link copied to clipboard

The small icon drawable resource.

Functions

Link copied to clipboard
protected fun onBindContentView(context: Context, contentView: RemoteViews, arguments: NotificationArguments)

Called to bind the content view.

Link copied to clipboard
protected open override fun onExtendBuilder(context: Context, builder: NotificationCompat.Builder, arguments: NotificationArguments): NotificationCompat.Builder

Override this method to extend the notification builder.

Inherited functions

Link copied to clipboard
protected open fun getNextId(context: Context, message: PushMessage): Int

Gets the next notification Id.

Link copied to clipboard
protected open fun getTitle(context: Context, message: PushMessage): String?

Gets the notification title.

Link copied to clipboard
open override fun onCreateNotification(context: Context, arguments: NotificationArguments): NotificationResult

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 override fun onNotificationCreated(context: Context, notification: Notification, arguments: NotificationArguments)

Called before posting the notification.