public interface IBrazeNotificationFactory
Modifier and Type | Method and Description |
---|---|
android.app.Notification |
createNotification(AppboyConfigurationProvider appConfigurationProvider,
android.content.Context context,
android.os.Bundle notificationExtras,
android.os.Bundle appboyExtras)
Deprecated.
Please use
createNotification(BrazeNotificationPayload) . Deprecated since 12/01/2020. |
android.app.Notification |
createNotification(BrazeNotificationPayload brazeNotificationPayload)
The interface for a custom notification factory.
|
@Deprecated android.app.Notification createNotification(AppboyConfigurationProvider appConfigurationProvider, android.content.Context context, android.os.Bundle notificationExtras, android.os.Bundle appboyExtras)
createNotification(BrazeNotificationPayload)
. Deprecated since 12/01/2020.createNotification(BrazeNotificationPayload)
returns null as it is the preferred method moving forward.appConfigurationProvider
- Braze app configurationcontext
- Application contextnotificationExtras
- the original Bundle object passed to Braze by fcm/adm, potentially
with additions or modifications.appboyExtras
- a Bundle object containing 'extra' key value pairs defined by the clientcreateNotification(BrazeNotificationPayload)
android.app.Notification createNotification(BrazeNotificationPayload brazeNotificationPayload)
Appboy#setCustomBrazeNotificationFactory(com.braze.IBrazeNotificationFactory)
allows for custom modification or replacement of Braze push messages before they are
deployed to the notification center.
Separate from notification object generation, it is also possible to handle deployment to the notification center itself manually (for example, to finely control what notification id is sent with the notification). When handling display manually, your notification factory should return null and also handle sending a push received broadcast intent and optionally waking the screen.
Note that #createNotification(com.braze.configuration.BrazeConfigurationProvider, Context, Bundle, Bundle)
is
only called if this method returns null for backwards compatibility reasons.
brazeNotificationPayload
- A convenience wrapper object around the Braze notification payload.