Skip to content

Commit

Permalink
feat(docs): Add delay recording guide Flutter
Browse files Browse the repository at this point in the history
  • Loading branch information
Sporiff committed Oct 31, 2023
1 parent 5b04830 commit 03277ff
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/code-snippets/flutter/examples/Adjust/setOfflineMode.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```dart
Adjust.setOfflineMode(true);
```
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);
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```dart
static void setOfflineMode(bool isOffline)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```dart
bool? eventBufferingEnabled;
```
33 changes: 33 additions & 0 deletions src/content/docs/en/sdk/flutter/configuration/delay.mdx
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 />

0 comments on commit 03277ff

Please sign in to comment.