OneSignal-Android-SDK
OneSignal-Android-SDK copied to clipboard
How to disable or unsubscribe In-App messages in the app
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 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.
Closing due to no response