Skip to content

Commit

Permalink
feat(docs): Add background guide Flutter
Browse files Browse the repository at this point in the history
  • Loading branch information
Sporiff committed Oct 31, 2023
1 parent 183dbab commit 5b04830
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
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);
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```dart
bool? sendInBackground;
```
21 changes: 21 additions & 0 deletions src/content/docs/en/sdk/flutter/configuration/background.mdx
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 />

0 comments on commit 5b04830

Please sign in to comment.