OneSignal-Android-SDK icon indicating copy to clipboard operation
OneSignal-Android-SDK copied to clipboard

How to disable or unsubscribe In-App messages in the app

Open rituapplocum opened this issue 3 years ago • 1 comments

Description: I'm trying to implement the push notifications services, but we are receiving In-App Messages in the app which isn't configured from our end.

Environment

Using com.onesignal:OneSignal:4.7.3 version

Initialization in Application

        OneSignal.initWithContext(this)
        OneSignal.setAppId(BuildConfig.ONESIGNAL_APP_ID)
        OneSignal.setNotificationOpenedHandler(NotificationOpenHandler(this))
        OneSignal.setNotificationWillShowInForegroundHandler { result ->
            NotificationReceiverHandler(
                this
            )
        }
        OneSignal.unsubscribeWhenNotificationsAreDisabled(false)

rituapplocum avatar Jun 07 '22 10:06 rituapplocum

@rituapplocum Can you explain in more detail what you mean by In-App Messages are not configured on our end? In-App Messages are added on the OneSignal dashboard and you pick a Segment that the In-App Messages will be shown to.

If you really want to disable In-App Message for the device you can use OneSignal.pauseInAppMessages(true) when your app starts up.

jkasten2 avatar Jun 07 '22 18:06 jkasten2

Closing due to no response

nan-li avatar Aug 12 '22 18:08 nan-li