From 03277fffb9e2ce3b4ba28de2659cd7e9ee592e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 31 Oct 2023 17:07:04 +0100 Subject: [PATCH] feat(docs): Add delay recording guide Flutter --- .../examples/Adjust/setOfflineMode.mdx | 3 ++ .../AdjustConfig/eventBufferingEnabled.mdx | 7 ++++ .../signatures/Adjust/setOfflineMode.mdx | 3 ++ .../AdjustConfig/eventBufferingEnabled.mdx | 3 ++ .../en/sdk/flutter/configuration/delay.mdx | 33 +++++++++++++++++++ 5 files changed, 49 insertions(+) create mode 100644 src/code-snippets/flutter/examples/Adjust/setOfflineMode.mdx create mode 100644 src/code-snippets/flutter/examples/AdjustConfig/eventBufferingEnabled.mdx create mode 100644 src/code-snippets/flutter/signatures/Adjust/setOfflineMode.mdx create mode 100644 src/code-snippets/flutter/signatures/AdjustConfig/eventBufferingEnabled.mdx create mode 100644 src/content/docs/en/sdk/flutter/configuration/delay.mdx diff --git a/src/code-snippets/flutter/examples/Adjust/setOfflineMode.mdx b/src/code-snippets/flutter/examples/Adjust/setOfflineMode.mdx new file mode 100644 index 0000000000..320e15ebe2 --- /dev/null +++ b/src/code-snippets/flutter/examples/Adjust/setOfflineMode.mdx @@ -0,0 +1,3 @@ +```dart +Adjust.setOfflineMode(true); +``` diff --git a/src/code-snippets/flutter/examples/AdjustConfig/eventBufferingEnabled.mdx b/src/code-snippets/flutter/examples/AdjustConfig/eventBufferingEnabled.mdx new file mode 100644 index 0000000000..5d33ff89d6 --- /dev/null +++ b/src/code-snippets/flutter/examples/AdjustConfig/eventBufferingEnabled.mdx @@ -0,0 +1,7 @@ +```dart {3} +AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.Sandbox); +//... +adjustConfig.eventBufferingEnabled = true; +//... +Adjust.start(adjustConfig); +``` diff --git a/src/code-snippets/flutter/signatures/Adjust/setOfflineMode.mdx b/src/code-snippets/flutter/signatures/Adjust/setOfflineMode.mdx new file mode 100644 index 0000000000..3ffc7c4a17 --- /dev/null +++ b/src/code-snippets/flutter/signatures/Adjust/setOfflineMode.mdx @@ -0,0 +1,3 @@ +```dart +static void setOfflineMode(bool isOffline) +``` diff --git a/src/code-snippets/flutter/signatures/AdjustConfig/eventBufferingEnabled.mdx b/src/code-snippets/flutter/signatures/AdjustConfig/eventBufferingEnabled.mdx new file mode 100644 index 0000000000..61f3117c24 --- /dev/null +++ b/src/code-snippets/flutter/signatures/AdjustConfig/eventBufferingEnabled.mdx @@ -0,0 +1,3 @@ +```dart +bool? eventBufferingEnabled; +``` diff --git a/src/content/docs/en/sdk/flutter/configuration/delay.mdx b/src/content/docs/en/sdk/flutter/configuration/delay.mdx new file mode 100644 index 0000000000..06ea8dc977 --- /dev/null +++ b/src/content/docs/en/sdk/flutter/configuration/delay.mdx @@ -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 +--- + + + +The offline mode setting isn't remembered between sessions. Offline mode is disabled at the start of each new session. + + + +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 `setOfflineMode` method || 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" + + + +## 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 `eventBufferingEnabled` property || that controls this behavior. Set this property to `true` to enable event buffering. + +import EventBufferingEnabled from "@flutter-examples/AdjustConfig/eventBufferingEnabled.mdx" + +