-
public final class NotificationConfig
-
-
Field Summary
Fields Modifier and Type Field Description private LongincomingRingingNotificationUpdateDelayMillisprivate final List<PushDeviceGenerator>pushDeviceGeneratorsprivate final Function0<Boolean>requestPermissionOnAppLaunchprivate final NotificationHandlernotificationHandlerprivate final BooleanautoRegisterPushDeviceprivate final Function0<Boolean>requestPermissionOnDeviceRegistrationprivate final BooleanhideRingingNotificationInForegroundprivate final BooleanenableCallNotificationUpdatesprivate final Set<String>mediaNotificationCallTypesprivate final Function1<Call, Flow<?>>notificationUpdateTriggers
-
Constructor Summary
Constructors Constructor Description NotificationConfig(List<PushDeviceGenerator> pushDeviceGenerators, Function0<Boolean> requestPermissionOnAppLaunch, NotificationHandler notificationHandler, Boolean autoRegisterPushDevice, Function0<Boolean> requestPermissionOnDeviceRegistration, Boolean hideRingingNotificationInForeground, Boolean enableCallNotificationUpdates, Set<String> mediaNotificationCallTypes, Function1<Call, Flow<?>> notificationUpdateTriggers, Long incomingRingingNotificationUpdateDelayMillis)NotificationConfig(List<PushDeviceGenerator> pushDeviceGenerators, Function0<Boolean> requestPermissionOnAppLaunch, NotificationHandler notificationHandler, Boolean autoRegisterPushDevice, Function0<Boolean> requestPermissionOnDeviceRegistration, Boolean hideRingingNotificationInForeground, Boolean enableCallNotificationUpdates, Set<String> mediaNotificationCallTypes, Function1<Call, Flow<?>> notificationUpdateTriggers)
-
Method Summary
Modifier and Type Method Description final LonggetIncomingRingingNotificationUpdateDelayMillis()Delay before replacing an unaccepted incoming-call notification whose channel owns ringing. final UnitsetIncomingRingingNotificationUpdateDelayMillis(Long incomingRingingNotificationUpdateDelayMillis)final List<PushDeviceGenerator>getPushDeviceGenerators()final Function0<Boolean>getRequestPermissionOnAppLaunch()final NotificationHandlergetNotificationHandler()final BooleangetAutoRegisterPushDevice()final Function0<Boolean>getRequestPermissionOnDeviceRegistration()final BooleangetHideRingingNotificationInForeground()Set this to true if you want to make the ringing notifications as low-priority in case the application is in foreground. final BooleangetEnableCallNotificationUpdates()If true, call notifications will receive subsequent updates, based on the number of participants and other data.final Set<String>getMediaNotificationCallTypes()List of call types (as Strings) for which media notifications should be enabled. final Function1<Call, Flow<?>>getNotificationUpdateTriggers()When notification updates are triggered, the update is based on observing internal call state. -
-
Constructor Detail
-
NotificationConfig
NotificationConfig(List<PushDeviceGenerator> pushDeviceGenerators, Function0<Boolean> requestPermissionOnAppLaunch, NotificationHandler notificationHandler, Boolean autoRegisterPushDevice, Function0<Boolean> requestPermissionOnDeviceRegistration, Boolean hideRingingNotificationInForeground, Boolean enableCallNotificationUpdates, Set<String> mediaNotificationCallTypes, Function1<Call, Flow<?>> notificationUpdateTriggers, Long incomingRingingNotificationUpdateDelayMillis)
-
NotificationConfig
NotificationConfig(List<PushDeviceGenerator> pushDeviceGenerators, Function0<Boolean> requestPermissionOnAppLaunch, NotificationHandler notificationHandler, Boolean autoRegisterPushDevice, Function0<Boolean> requestPermissionOnDeviceRegistration, Boolean hideRingingNotificationInForeground, Boolean enableCallNotificationUpdates, Set<String> mediaNotificationCallTypes, Function1<Call, Flow<?>> notificationUpdateTriggers)
-
-
Method Detail
-
getIncomingRingingNotificationUpdateDelayMillis
final Long getIncomingRingingNotificationUpdateDelayMillis()
Delay before replacing an unaccepted incoming-call notification whose channel owns ringing. Android may stop an insistent alert when that notification is immediately replaced. Set this to
0to disable the delay.
-
setIncomingRingingNotificationUpdateDelayMillis
final Unit setIncomingRingingNotificationUpdateDelayMillis(Long incomingRingingNotificationUpdateDelayMillis)
-
getPushDeviceGenerators
final List<PushDeviceGenerator> getPushDeviceGenerators()
-
getRequestPermissionOnAppLaunch
final Function0<Boolean> getRequestPermissionOnAppLaunch()
-
getNotificationHandler
final NotificationHandler getNotificationHandler()
-
getAutoRegisterPushDevice
final Boolean getAutoRegisterPushDevice()
-
getRequestPermissionOnDeviceRegistration
final Function0<Boolean> getRequestPermissionOnDeviceRegistration()
-
getHideRingingNotificationInForeground
final Boolean getHideRingingNotificationInForeground()
Set this to true if you want to make the ringing notifications as low-priority in case the application is in foreground. This will prevent the notification from interrupting the user while he is in the app. In this case you need to make sure to handle this call state and display an incoming call screen. NOTE: This setting has only an effect if you don't set a custom NotificationHandler!
-
getEnableCallNotificationUpdates
final Boolean getEnableCallNotificationUpdates()
If
true, call notifications will receive subsequent updates, based on the number of participants and other data.
-
getMediaNotificationCallTypes
final Set<String> getMediaNotificationCallTypes()
List of call types (as Strings) for which media notifications should be enabled. Allows support for custom user-defined call types.
-
getNotificationUpdateTriggers
final Function1<Call, Flow<?>> getNotificationUpdateTriggers()
When notification updates are triggered, the update is based on observing internal call state. This parameters enables customization on which state flows will trigger a notification update.
-
-
-
-