You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ In the sections below, we will review each of the steps in more detail:
36
36
In your app, you can setup the SPConsent manager in a external file or on your app. In the example below we use `useRef`
37
37
to keep a reference of the `SPConsentManager`.
38
38
39
-
> It is important to notice that we wrap the initialisation of `SPConsentManager` in a `useEffect` and call `consentManager.current?.dispose()` to avoid memory leaks.
39
+
> It is important to notice that we wrap the initialisation of `SPConsentManager` in a `useEffect` and set its reference to `null` to avoid memory leaks.
@@ -88,6 +88,7 @@ Refer to the table below regarding the different campaigns that can be implement
88
88
| `onAction(callback: (action:string) => {})` | Called when the user takes an action (e.g. Accept All) within the consent message. `action: string` is going to be replaced with an enum. |
89
89
| `onSPUIFinished(callback: () => {})` | Called when the native SDKs is done removing the consent UI from the foreground. |
90
90
| `onFinished(callback: () => {})` | Called when all UI and network processes are finished. User consent is stored on the local storage of each platform (`UserDefaults` for iOS and `SharedPrefs` for Android). And it is safe to retrieve consent data with `getUserData` |
91
+
| `onMessageInactivityTimeout(callback: () => {})` | Called when the user becomes inactive while viewing a consent message. This allows your app to respond to user inactivity events. |
91
92
| `onError(callback: (description:string) => {})` | Called if something goes wrong. |
92
93
93
94
### Call `loadMessages`
@@ -239,6 +240,8 @@ export default function App() {
239
240
// is disabled in the Sourcepoint dashboard
240
241
language: SPMessageLanguage.ENGLISH,
241
242
messageTimeoutInSeconds: 20,
243
+
// Allows Android users to dismiss the consent message on back press. True by default. Set it to false if you wish to prevent this users from dismissing the message on back press.
244
+
androidDismissMessageOnBackPress: true,
242
245
}
243
246
);
244
247
@@ -255,6 +258,9 @@ export default function App() {
0 commit comments