Session logic
The Digital Mobile SDK works on a session basis. These sessions impact functionality such as targeting, for example triggering a survey after a certain number of sessions.
A session is started whenever the app is:
- launched or opened
- re-instantiated, re-opened, or the app switched from either:
- being in the background for more than 1 hour
- being closed or killed
- after being reinstalled
With each new app session the SDK:
- re-evaluates the targeting logic
- retrieves the latest configuration criteria
A new session instance is created based on one of the following:
- New Session - Application is launched and is in the foreground with services initialized
- Refresh Session - Application is in the background for a defined amount of time, the default is 60 minutes. Session refresh time is configurable.
How the survey behaves when the app is put into the background can depend on the operating system. For example, suppose a survey is open and the app where the SDK is initialized is put into the background without really closing the app. When the user goes back into the app, they still see the survey open unless you use the closeEngagement API to close the survey after a certain duration of being in the background.
Deferred survey invites
As part of the default Digital invitation to provide feedback there is an option to defer the invite. This is usually a "Maybe later" button, but also applies to when a user swipes a banner invitation away or ignores an invite that is set to disappear. This is specific to Digital In-app and covers the situation where an invite is triggered at a moment not convenient to the user. They can defer the invite and it is set to wait before being shown again. The invite cannot be shown again until the app has been in the background for at least 60 minutes. Only after this period can the user be targeted by this invite again.
