Skip to content

The proper way to silence notifications when app is in foreground #99

Answered by mirzemehdi
Too-Many-Bytes asked this question in Q&A
Discussion options

You must be logged in to vote

There is this showPushNotification field when initializing the library. Not sure if that's what you are looking for @Too-Many-Bytes

/**
        * By default showPushNotification value is true.
        * When set showPushNotification to false foreground push  notification will not be shown to user.
        * You can still get notification content using #onPushNotification listener method.
        */

NotifierManager.initialize(
           configuration = NotificationPlatformConfiguration.Android(
               notificationIconResId = R.drawable.ic_launcher_foreground,
               showPushNotification = true,
           )
       )
       

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Too-Many-Bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants