PushwooshSummaryNotificationFactory

Default implementation of SummaryNotificationFactory provided by the Pushwoosh SDK.

This class provides minimal default behavior for grouped notification summaries. It uses the same icon and color as individual notifications and provides no custom summary text. This factory is used automatically when multi-notification mode is enabled but no custom summary factory is registered.

Default Behavior:

  • No summary message text (empty string)
  • Uses the same small icon as individual notifications
  • Uses the same accent color as individual notifications
  • Summary notification does not auto-dismiss when tapped

When to Use: This default factory is suitable if you just want basic notification grouping without custom summary appearance. For better user experience, consider creating your own factory that extends SummaryNotificationFactory directly and provides meaningful summary text and custom styling.

Example - Extend for customization:


  // Instead of using PushwooshSummaryNotificationFactory directly,
  // extend SummaryNotificationFactory for full control:

  public class MySummaryFactory extends SummaryNotificationFactory {
      
      public String summaryNotificationMessage(int notificationsAmount) {
          return notificationsAmount + " new messages";
      }

      
      public int summaryNotificationIconResId() {
          return R.drawable.ic_notification_stack;
      }

      
      public int summaryNotificationColor() {
          return 0xFF6200EE;
      }
  }

  // Register in AndroidManifest.xml:
  <meta-data
      android:name="com.pushwoosh.summary_notification_factory"
      android:value=".MySummaryFactory" />

Note: You typically don't need to extend this class. Instead, extend SummaryNotificationFactory directly for better control and clearer intent.

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
protected val applicationContext: Context

Functions

Link copied to clipboard
Controls whether the summary notification automatically dismisses when the user taps it.
Link copied to clipboard
open fun getNotificationIntent(): Intent
Link copied to clipboard
fun onGenerateSummaryNotification(notificationsAmount: Int, notificationChannelId: String, groupId: String): Notification
Link copied to clipboard
Controls whether summary notifications should be generated at all.
Link copied to clipboard
Returns the accent color for the summary notification icon.
Link copied to clipboard
Returns the small icon resource ID for the summary notification.
Link copied to clipboard
open fun summaryNotificationMessage(notificationsAmount: Int): String
Returns the message text displayed in the summary notification.