public class

CustomLayoutNotificationProvider

extends AirshipNotificationProvider
java.lang.Object
   ↳ com.urbanairship.push.notifications.AirshipNotificationProvider
     ↳ com.urbanairship.push.notifications.CustomLayoutNotificationProvider

Class Overview

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(RemoteViews, NotificationArguments).

Summary

[Expand]
Inherited Constants
From class com.urbanairship.push.notifications.AirshipNotificationProvider
From interface com.urbanairship.push.notifications.NotificationProvider
Public Constructors
CustomLayoutNotificationProvider(Context context, AirshipConfigOptions configOptions, int layoutId)
Protected Methods
void onBindContentView(RemoteViews contentView, NotificationArguments arguments)
Called to bind the content view.
NotificationCompat.Builder onExtendBuilder(Context context, NotificationCompat.Builder builder, NotificationArguments arguments)
Override this method to extend the notification builder.
[Expand]
Inherited Methods
From class com.urbanairship.push.notifications.AirshipNotificationProvider
From class java.lang.Object
From interface com.urbanairship.push.notifications.NotificationProvider

Public Constructors

public CustomLayoutNotificationProvider (Context context, AirshipConfigOptions configOptions, int layoutId)

Protected Methods

protected void onBindContentView (RemoteViews contentView, NotificationArguments arguments)

Called to bind the content view.

Parameters
contentView The custom content view.
arguments The notification arguments.

protected NotificationCompat.Builder onExtendBuilder (Context context, NotificationCompat.Builder builder, NotificationArguments arguments)

Override this method to extend the notification builder. The default method behavior applies extends the builder with PublicNotificationExtender, WearableNotificationExtender, ActionsNotificationExtender, and StyleNotificationExtender.

Parameters
context The application context.
builder The notification builder.
arguments The notification arguments.
Returns
  • The notification builder.