Body:
SDK Version: OneSignal Unity SDK 5.1.12
Platform: Android
Unity Version: 2022.3.62
Description
Setting OneSignal.InAppMessages.Paused = false mid-session does not cause the SDK to re-evaluate or re-attempt displaying IAMs that were queued during the current session. The IAM only displays when a new session starts (app returning from 30+ seconds in background).
Expected Behaviour
Based on the documentation which states "Changing the value to false resumes normal message delivery for users who qualify based on their triggers", setting Paused = false mid-session should allow already-queued IAMs to display immediately if trigger conditions are currently satisfied.
Actual Behaviour
Setting Paused = false and updating a trigger value mid-session does not fire WillDisplay. The IAM only displays at the next session boundary (30+ seconds background then foreground).
Steps to Reproduce
Configure an IAM campaign with trigger condition: view IS challenges AND OpenApp IS true, trigger type: When certain conditions are satisfied
On Initialize(), set Paused = true and call AddTrigger("OpenApp", "true")
When user navigates to challenges screen, call Paused = false then AddTrigger("view", "challenges")
When user leaves challenges screen, call Paused = true then AddTrigger("view", "other")
Navigate to challenges screen while app is active
Logs
// App opens — triggers set, Paused=true
OneSignalService::AddIAMTrigger: Key=OpenApp, Value=true
// Navigate to challenges — Paused=false, view=challenges set
OneSignalService::AddIAMTrigger: Key=view, Value=challenges
OneSignalService::OnRouteChanged: view=challenges, unpaused
// Leave challenges — Paused=true, view=other
OneSignalService::AddIAMTrigger: Key=view, Value=other
OneSignalService::OnRouteChanged: view=other, paused
// Navigate to challenges again — Paused=false, view=challenges
OneSignalService::AddIAMTrigger: Key=view, Value=challenges
OneSignalService::OnRouteChanged: view=challenges, unpaused
// No WillDisplay fires — IAM does not show
// User minimises app, waits 30+ seconds, returns to challenges
// Only NOW does WillDisplay fire (new session boundary)
OneSignalService::OnInAppMessageWillDisplay: MessageId=xxx, Paused=False
OneSignalService::OnInAppMessageDidDisplay: MessageId=xxx
Additional Context
This behaviour was also reported in issue #1234 where pauseInAppMessages toggling per-activity did not work as expected, with no resolution
The documentation states AddTrigger causes immediate re-evaluation, but this does not result in IAM display mid-session when Paused was previously true
The workaround of keeping Paused = false at all times and relying purely on trigger conditions also does not work — the IAM still only displays at session boundaries regardless
Question for OneSignal team: Is this intentional behaviour? If so, is there any supported way to display an IAM on a specific screen mid-session without requiring a new session
Body:
SDK Version: OneSignal Unity SDK 5.1.12
Platform: Android
Unity Version: 2022.3.62
Description
Setting OneSignal.InAppMessages.Paused = false mid-session does not cause the SDK to re-evaluate or re-attempt displaying IAMs that were queued during the current session. The IAM only displays when a new session starts (app returning from 30+ seconds in background).
Expected Behaviour
Based on the documentation which states "Changing the value to false resumes normal message delivery for users who qualify based on their triggers", setting Paused = false mid-session should allow already-queued IAMs to display immediately if trigger conditions are currently satisfied.
Actual Behaviour
Setting Paused = false and updating a trigger value mid-session does not fire WillDisplay. The IAM only displays at the next session boundary (30+ seconds background then foreground).
Steps to Reproduce
Configure an IAM campaign with trigger condition: view IS challenges AND OpenApp IS true, trigger type: When certain conditions are satisfied
On Initialize(), set Paused = true and call AddTrigger("OpenApp", "true")
When user navigates to challenges screen, call Paused = false then AddTrigger("view", "challenges")
When user leaves challenges screen, call Paused = true then AddTrigger("view", "other")
Navigate to challenges screen while app is active
Logs
// App opens — triggers set, Paused=true
OneSignalService::AddIAMTrigger: Key=OpenApp, Value=true
// Navigate to challenges — Paused=false, view=challenges set
OneSignalService::AddIAMTrigger: Key=view, Value=challenges
OneSignalService::OnRouteChanged: view=challenges, unpaused
// Leave challenges — Paused=true, view=other
OneSignalService::AddIAMTrigger: Key=view, Value=other
OneSignalService::OnRouteChanged: view=other, paused
// Navigate to challenges again — Paused=false, view=challenges
OneSignalService::AddIAMTrigger: Key=view, Value=challenges
OneSignalService::OnRouteChanged: view=challenges, unpaused
// No WillDisplay fires — IAM does not show
// User minimises app, waits 30+ seconds, returns to challenges
// Only NOW does WillDisplay fire (new session boundary)
OneSignalService::OnInAppMessageWillDisplay: MessageId=xxx, Paused=False
OneSignalService::OnInAppMessageDidDisplay: MessageId=xxx
Additional Context
This behaviour was also reported in issue #1234 where pauseInAppMessages toggling per-activity did not work as expected, with no resolution
The documentation states AddTrigger causes immediate re-evaluation, but this does not result in IAM display mid-session when Paused was previously true
The workaround of keeping Paused = false at all times and relying purely on trigger conditions also does not work — the IAM still only displays at session boundaries regardless
Question for OneSignal team: Is this intentional behaviour? If so, is there any supported way to display an IAM on a specific screen mid-session without requiring a new session