-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): Add background guide Flutter
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
src/code-snippets/flutter/examples/AdjustConfig/sendInBackground.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
```dart {3} | ||
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox); | ||
//... | ||
adjustConfig.sendInBackground = true; | ||
//... | ||
Adjust.start(adjustConfig); | ||
``` |
3 changes: 3 additions & 0 deletions
3
src/code-snippets/flutter/signatures/AdjustConfig/sendInBackground.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```dart | ||
bool? sendInBackground; | ||
``` |
21 changes: 21 additions & 0 deletions
21
src/content/docs/en/sdk/flutter/configuration/background.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: Record activity in the background | ||
description: Configure the SDK to send requests in the background. | ||
slug: en/sdk/flutter/configuration/background | ||
--- | ||
|
||
By default, the Adjust SDK pauses the sending of requests when your app is running in the background. You can configure the SDK to send requests in the background by enabling the background recording feature. | ||
|
||
import SetSendInBackgroundSig from "@flutter-signatures/AdjustConfig/sendInBackground.mdx" | ||
|
||
Your config object contains a boolean <Tooltip>`sendInBackground` property || <SetSendInBackgroundSig /></Tooltip> that controls this behavior. When set to `true`, the SDK sends data to Adjust while the app is running in the background. | ||
|
||
<Callout type="important"> | ||
|
||
You must set the `sendInBackground` property *before* you initialize the Adjust SDK. | ||
|
||
</Callout> | ||
|
||
import SetSendInBackground from "@flutter-examples/AdjustConfig/sendInBackground.mdx" | ||
|
||
<SetSendInBackground /> |