-
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 delay recording guide Flutter
- Loading branch information
Showing
5 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
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 | ||
Adjust.setOfflineMode(true); | ||
``` |
7 changes: 7 additions & 0 deletions
7
src/code-snippets/flutter/examples/AdjustConfig/eventBufferingEnabled.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.eventBufferingEnabled = true; | ||
//... | ||
Adjust.start(adjustConfig); | ||
``` |
3 changes: 3 additions & 0 deletions
3
src/code-snippets/flutter/signatures/Adjust/setOfflineMode.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 | ||
static void setOfflineMode(bool isOffline) | ||
``` |
3 changes: 3 additions & 0 deletions
3
src/code-snippets/flutter/signatures/AdjustConfig/eventBufferingEnabled.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? eventBufferingEnabled; | ||
``` |
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,33 @@ | ||
--- | ||
title: Delay recording | ||
description: Configure the SDK to delay the sending of information to Adjust's servers. | ||
slug: en/sdk/flutter/configuration/delay | ||
--- | ||
|
||
<Callout type="important"> | ||
|
||
The offline mode setting isn't remembered between sessions. Offline mode is disabled at the start of each new session. | ||
|
||
</Callout> | ||
|
||
The Adjust SDK sends event and session data to Adjust's servers in real time. You can pause the sending of information by putting the SDK in offline mode. In offline mode the SDK stores all data in a local file on the device. The SDK sends this information to Adjust's servers when you disable offline mode. | ||
|
||
import SetOfflineModeSig from "@flutter-signatures/Adjust/setOfflineMode.mdx" | ||
|
||
Your config object contains a boolean `isOffline` property that controls this behavior. You can update this property at any time by calling the <Tooltip>`setOfflineMode` method || <SetOfflineModeSig /></Tooltip> with a boolean argument. The SDK sends all saved information to Adjust's servers when you deactivate offline mode. | ||
|
||
import SetOfflineMode from "@flutter-examples/Adjust/setOfflineMode.mdx" | ||
|
||
<SetOfflineMode /> | ||
|
||
## Event buffering | ||
|
||
The Adjust SDK sends event information as soon as a user triggers an event in your app. You can send event information on a schedule by enabling event buffering. Event buffering stores events in a local buffer on the device and sends all requests once per minute. | ||
|
||
import EventBufferingEnabledSig from "@flutter-signatures/AdjustConfig/eventBufferingEnabled.mdx" | ||
|
||
Your config object contains a boolean <Tooltip>`eventBufferingEnabled` property || <EventBufferingEnabledSig /></Tooltip> that controls this behavior. Set this property to `true` to enable event buffering. | ||
|
||
import EventBufferingEnabled from "@flutter-examples/AdjustConfig/eventBufferingEnabled.mdx" | ||
|
||
<EventBufferingEnabled /> |