Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 54 additions & 19 deletions android/current.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<span style="font-weight: 400;">Now, add the Countly SDK dependency (</span><strong>use the latest SDK version currently available from gradle, not specifically the one shown in the sample below</strong><span style="font-weight: 400;">).</span>
</p>
<pre><code class="java">dependencies {
implementation 'ly.count.android:sdk:25.4.0'
implementation 'ly.count.android:sdk:25.4.1'
}</code></pre>
<h1 id="h_01HAVQDM5SKEGK68HD5082KAZH">SDK Integration</h1>
<p>
Expand Down Expand Up @@ -281,12 +281,12 @@ CountlyNative.initNative(getApplicationContext());</code></pre>
</div>
<div class="tab">
<pre><code class="java">plugins {
id "ly.count.android.plugins.upload-symbols" version "25.4.0"
id "ly.count.android.plugins.upload-symbols" version "25.4.1"
}</code></pre>
</div>
<div class="tab is-hidden">
<pre><code class="java">plugins {
id("ly.count.android.plugins.upload-symbols") version "25.4.0"
id("ly.count.android.plugins.upload-symbols") version "25.4.1"
}</code></pre>
</div>
</div>
Expand All @@ -303,7 +303,7 @@ CountlyNative.initNative(getApplicationContext());</code></pre>
<div class="tab">
<pre><code class="java">// in root level gradle file
plugins {
id "ly.count.android.plugins.upload-symbols" version "25.4.0" apply false
id "ly.count.android.plugins.upload-symbols" version "25.4.1" apply false
}

// in sub-project gradle file
Expand All @@ -314,7 +314,7 @@ plugins {
<div class="tab is-hidden">
<pre><code class="java">// in root level gradle file
plugins {
id("ly.count.android.plugins.upload-symbols") version "25.4.0" apply false
id("ly.count.android.plugins.upload-symbols") version "25.4.1" apply false
}

// in sub-project gradle file
Expand Down Expand Up @@ -3047,26 +3047,40 @@ config.setAppCrawlerNames(new String[] { "App Crawler" });
Countly.sharedInstance().requestQueue().isDeviceAppCrawler();</code></pre>
<h2 id="h_01HAVQDM5WXRHGD4ETK4THSKXY">Interacting with the Internal Request Queue</h2>
<p>
When recording events or activities, the requests don't always get sent immediately.
Events get grouped together and sometimes there is no connection to the server
and the requests can't be sent.
When recording events or user activities, requests are not always sent to the
server immediately. They may be batched together for efficiency or delayed due
to lack of network connectivity.
</p>
<p>
There are two ways how to interact with this request queue at the moment.&nbsp;
Currently, there are two ways to interact with this internal request queue:
</p>
<p>
You can force the SDK to try to send the requests immediately:
</p>
<pre>//Doing internally stored requests<br>Countly.sharedInstance().requestQueue().attemptToSendStoredRequests();</pre>
<p>
This way the SDK will not wait for its internal triggers and it will try to empty
the queue on demand.
This approach bypasses the SDK’s internal scheduling mechanisms and initiates
an immediate attempt to send all queued requests.
</p>
<p>
There are some circumstances where you would want to delete all stored requests.
Then you would call:
In certain situations, you may need to delete all stored requests from the queue.
To do so, invoke the following method:
</p>
<pre><span>//Delete all stored requests in queue<br></span>Countly.sharedInstance().requestQueue().flushQueues();</pre>
<h2 id="h_01JXEZGV0DRSK14XWH9YXWD2K9">Backoff Mechanism</h2>
<p>
The SDK includes a backoff mechanism that temporarily pauses sending requests
when the server is slow or unresponsive. This helps reduce server load and avoid
unnecessary retries. It’s enabled by default but can be disabled if needed.
</p>
<pre><code class="class">CountlyConfig config = (new CountlyConfig(appC, COUNTLY_APP_KEY, COUNTLY_SERVER_URL));
config.disableBackoffMechanism();
Countly.sharedInstance().init(config);</code></pre>
<p>
For a detailed explanation of how the backoff mechanism works and when it triggers,
see the
<a href="/hc/en-us/articles/9290669873305#h_05JJ9EJ330VBFVZRZEWZYSZT30" target="_blank" rel="noopener noreferrer">full documentation here</a>.
</p>
<h2 id="h_01HAVQDM5W7W375FCJET7Z57CW">Direct Request</h2>
<p>
<span style="font-weight: 400;">This feature allows you to create custom functionality or implement features that the SDK might be lacking at that moment.</span>
Expand Down Expand Up @@ -3190,15 +3204,32 @@ Countly.sharedInstance().requestQueue().addDirectRequest(requestMap);</code></pr
other scenarios, we recommend using the default storage behavior provided by
the Countly SDK.
</p>
<h2 id="h_01HAVQDM5W6FJH42AFSGV7FZ2T">Server Configuration</h2>
<div class="callout callout--warning">
<p>This is an experimental feature!</p>
<h2 id="h_01HAVQDM5W6FJH42AFSGV7FZ2T">SDK Behavior Settings</h2>
<div class="callout callout--info">
<p>
Previously known as <strong>Server Configuration</strong>, this feature is
now called <strong>SDK Behavior Settings</strong> in the SDKs. The Countly
server will adopt this naming soon, but you may still see the old term in
the Dashboard for now.
</p>
</div>
<p>
You can make your SDK fetch some configurations you have set in your Countly
server by setting <code>enableServerConfiguration</code> during init:
SDK Behavior Settings are enabled by default. Any changes made in the SDK Manager’s
"SDK Configuration" section on the server will directly affect the behavior of
the SDK.
</p>
<p>
In most cases, the configuration may not be applied during the app’s first run.
If the behavior controlled by these settings is critical for security or consistency,
you can manually provide the configuration to the SDK during initialization.
</p>
<pre><code class="java">config.enableServerConfiguration()</code></pre>
<pre><code class="java">config.setSDKBehaviorSettings("{json server config}");</code></pre>
<p>
If you want to disable automatic config updates from the server, you can prevent
the SDK from making server configuration fetch requests. This is useful if you're
trying to reduce network traffic or control request counts.
</p>
<pre><code class="java">config.disableSDKBehaviorSettingsUpdates();</code></pre>
<h2 id="h_01J7191100003PJ0HZHYR8GS5B">Content Zone</h2>
<p>
The Content Zone feature enhances user engagement by delivering various types
Expand Down Expand Up @@ -3228,6 +3259,10 @@ Countly.sharedInstance().requestQueue().addDirectRequest(requestMap);</code></pr
while initializing the SDK through and it must be greater than 15 seconds.
</p>
<pre><code class="java">countlyConfig.content.setZoneTimerInterval(60); //in seconds</code></pre>
<p>
If you need to ask for content after a trigger you know you can use this method:
</p>
<pre><code class="java">Countly.sharedInstance().contents().refreshContentZone()</code></pre>
<p>
When you want to exit from content zone and stop SDK from checking for available
content you can use this method:
Expand Down
37 changes: 21 additions & 16 deletions android/next.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<span style="font-weight: 400;">Now, add the Countly SDK dependency (</span><strong>use the latest SDK version currently available from gradle, not specifically the one shown in the sample below</strong><span style="font-weight: 400;">).</span>
</p>
<pre><code class="java">dependencies {
implementation 'ly.count.android:sdk:25.4.0'
implementation 'ly.count.android:sdk:25.4.1'
}</code></pre>
<h1 id="h_01HAVQDM5SKEGK68HD5082KAZH">SDK Integration</h1>
<p>
Expand Down Expand Up @@ -281,12 +281,12 @@ CountlyNative.initNative(getApplicationContext());</code></pre>
</div>
<div class="tab">
<pre><code class="java">plugins {
id "ly.count.android.plugins.upload-symbols" version "25.4.0"
id "ly.count.android.plugins.upload-symbols" version "25.4.1"
}</code></pre>
</div>
<div class="tab is-hidden">
<pre><code class="java">plugins {
id("ly.count.android.plugins.upload-symbols") version "25.4.0"
id("ly.count.android.plugins.upload-symbols") version "25.4.1"
}</code></pre>
</div>
</div>
Expand All @@ -303,7 +303,7 @@ CountlyNative.initNative(getApplicationContext());</code></pre>
<div class="tab">
<pre><code class="java">// in root level gradle file
plugins {
id "ly.count.android.plugins.upload-symbols" version "25.4.0" apply false
id "ly.count.android.plugins.upload-symbols" version "25.4.1" apply false
}

// in sub-project gradle file
Expand All @@ -314,7 +314,7 @@ plugins {
<div class="tab is-hidden">
<pre><code class="java">// in root level gradle file
plugins {
id("ly.count.android.plugins.upload-symbols") version "25.4.0" apply false
id("ly.count.android.plugins.upload-symbols") version "25.4.1" apply false
}

// in sub-project gradle file
Expand Down Expand Up @@ -2780,10 +2780,6 @@ Countly.sharedInstance().init(countlyConfig);</code></pre>
the SDK not write the request and event queues to disk until the explicit
write signal is given.
</li>
<li>
<strong>setSDKBehaviorSettings(String sdkBehaviorSettings)</strong> - Set
the server configuration to be set while initializing the SDK
</li>
</ul>
<h2 id="h_01HND059CTVC4QBVMB6P4CSVE7">Example Integrations</h2>
<p>
Expand Down Expand Up @@ -3208,15 +3204,24 @@ Countly.sharedInstance().requestQueue().addDirectRequest(requestMap);</code></pr
other scenarios, we recommend using the default storage behavior provided by
the Countly SDK.
</p>
<h2 id="h_01HAVQDM5W6FJH42AFSGV7FZ2T">Server Configuration</h2>
<div class="callout callout--warning">
<p>This is an experimental feature!</p>
</div>
<h2 id="h_01HAVQDM5W6FJH42AFSGV7FZ2T">SDK Behavior Settings</h2>
<p>
SDK Behavior Settings are enabled by default. Any changes made in the SDK Manager’s
"SDK Configuration" section on the server will directly affect the behavior of
the SDK.
</p>
<p>
In most cases, the configuration may not be applied during the app’s first run.
If the behavior controlled by these settings is critical for security or consistency,
you can manually provide the configuration to the SDK during initialization.
</p>
<pre><code class="java">config.setSDKBehaviorSettings("{json server config}");</code></pre>
<p>
You can make your SDK fetch some configurations you have set in your Countly
server by setting <code>enableServerConfiguration</code> during init:
If you want to disable automatic config updates from the server, you can prevent
the SDK from making server configuration fetch requests. This is useful if you're
trying to reduce network traffic or control request counts.
</p>
<pre><code class="java">config.enableServerConfiguration()</code></pre>
<pre><code class="java">config.disableSDKBehaviorSettingsUpdates();</code></pre>
<h2 id="h_01J7191100003PJ0HZHYR8GS5B">Content Zone</h2>
<p>
The Content Zone feature enhances user engagement by delivering various types
Expand Down
22 changes: 18 additions & 4 deletions flutter/next.md
Original file line number Diff line number Diff line change
Expand Up @@ -1894,10 +1894,6 @@ config.setParameterTamperingProtectionSalt("salt");</code></pre>
<strong><a href="#h_01H930GAQ8QNMCJGCMC0TS6CEV" target="_self" rel="undefined">Indirect Attribution</a> -</strong>
Report indirect user attribution <strong>(no Web platform support)</strong>
</li>
<li>
<strong>setSDKBehaviorSettings(String sdkBehaviorSettings)</strong> - Set
the server configuration to be set while initializing the SDK
</li>
</ul>
<h2 id="h_01HPGP75J54BBZFVZE7S7K1N2H">Example Integrations</h2>
<p>
Expand Down Expand Up @@ -2188,6 +2184,24 @@ config.setEventQueueSizeToSend(6);</code></pre>
function:
</p>
<pre><code class="dart">Countly.isInitialized();</code></pre>
<h2 id="h_01JSKRSAXEH9RYJ8X22P3GEH45">SDK Behavior Settings</h2>
<p>
SDK Behavior Settings are enabled by default. Any changes made in the SDK Manager’s
"SDK Configuration" section on the server will directly affect the behavior of
the SDK.
</p>
<p>
In most cases, the configuration may not be applied during the app’s first run.
If the behavior controlled by these settings is critical for security or consistency,
you can manually provide the configuration to the SDK during initialization.
</p>
<pre><code class="dart">config.setSDKBehaviorSettings("{json server config}")</code></pre>
<p>
If you want to disable automatic config updates from the server, you can prevent
the SDK from making server configuration fetch requests. This is useful if you're
trying to reduce network traffic or control request counts.
</p>
<pre><code class="dart">config.disableSDKBehaviorSettingsUpdates()</code></pre>
<h2 id="h_01JDHWBTSH0SJXE2NKFN1ZX45G">Content Zone</h2>
<p>
The Content Zone feature enhances user engagement by delivering various types
Expand Down
Loading