Skip to content

Commit c9957d5

Browse files
committed
Version updates
1 parent fce0a2e commit c9957d5

File tree

14 files changed

+291
-77
lines changed

14 files changed

+291
-77
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 25.4.0
2+
* Added `refreshContentZone()` method for probing content
3+
* Added `setSDKBehaviorSettings` init config method for providing server config settings
4+
* Added `disableBackoffMechanism` init config method for disabling request backoff logic
5+
* Added `disableSDKBehaviorSettingsUpdates` init config method for disabling server config sync requests
6+
17
## 25.1.2
28
* Mitigated an issue where the visibility tracking could have been enabled by default
39

Countly.d.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ declare module "countly-sdk-react-native-bridge" {
211211
*/
212212
export function enterContentZone(): void;
213213

214+
/**
215+
* Refreshes the content zone.
216+
*/
217+
export function refreshContentZone(): void;
218+
214219
/**
215220
* Opt out user from the content fetching and updates
216221
*/
@@ -1454,6 +1459,26 @@ declare module "countly-sdk-react-native-bridge/CountlyConfig" {
14541459
* @param {object} attributionValues attribution values
14551460
*/
14561461
recordIndirectAttribution(attributionValues: object): CountlyConfig;
1462+
1463+
/**
1464+
* Method to disable SDK behavior settings updates requests.
1465+
* @return {CountlyConfig}
1466+
*/
1467+
disableSDKBehaviorSettingsUpdates(): CountlyConfig;
1468+
1469+
/**
1470+
* Method to disable backoff mechanism for requests.
1471+
* @return {CountlyConfig}
1472+
*/
1473+
disableBackoffMechanism(): CountlyConfig;
1474+
1475+
/**
1476+
* Method to set SDK behavior settings.
1477+
*
1478+
* @param {object} settingsObject settings object
1479+
* @return {CountlyConfig}
1480+
*/
1481+
setSDKBehaviorSettings(settingsObject: object): CountlyConfig;
14571482
}
14581483

14591484
export default CountlyConfig;

Countly.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,6 @@ Countly.setCustomMetrics = async function (customMetric) {
22042204
/**
22052205
* Opt in user for the content fetching and updates
22062206
*
2207-
* NOTE: This is an EXPERIMENTAL feature, and it can have breaking changes
22082207
*/
22092208
Countly.content.enterContentZone = function() {
22102209
L.i("enterContentZone, opting for content fetching.");
@@ -2216,10 +2215,22 @@ Countly.content.enterContentZone = function() {
22162215
CountlyNativeModule.enterContentZone();
22172216
};
22182217

2218+
/**
2219+
* Refreshes the content zone.
2220+
*/
2221+
Countly.content.refreshContentZone = function() {
2222+
L.i("refreshContentZone, refreshing content zone.");
2223+
if (!_state.isInitialized) {
2224+
const message = "'init' must be called before 'refreshContentZone'";
2225+
L.e(`refreshContentZone, ${message}`);
2226+
return;
2227+
}
2228+
CountlyNativeModule.refreshContentZone();
2229+
};
2230+
22192231
/**
22202232
* Opt out user from the content fetching and updates
22212233
*
2222-
* NOTE: This is an EXPERIMENTAL feature, and it can have breaking changes
22232234
*/
22242235
Countly.content.exitContentZone = function() {
22252236
L.i("exitContentZone, opting out from content fetching.");

CountlyConfig.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,17 @@ import CountlyConfigContent from "./lib/configuration_interfaces/countly_config_
1818
*/
1919
class CountlyConfig {
2020
#crashReporting = false;
21+
2122
#apmLegacy = false;
23+
2224
#disableIntentRedirectionCheck = false;
25+
26+
#disableSDKBehaviorSettingsUpdates = false;
27+
28+
#disableBackoff = false;
29+
30+
#sdkBehaviorSettings;
31+
2332
constructor(serverURL, appKey) {
2433
this.serverURL = serverURL;
2534
this.appKey = appKey;
@@ -69,6 +78,18 @@ class CountlyConfig {
6978
return this.#disableIntentRedirectionCheck;
7079
}
7180

81+
get _disableSDKBehaviorSettingsUpdates() {
82+
return this.#disableSDKBehaviorSettingsUpdates;
83+
}
84+
85+
get _disableBackoff() {
86+
return this.#disableBackoff;
87+
}
88+
89+
get _sdkBehaviorSettings() {
90+
return this.#sdkBehaviorSettings;
91+
}
92+
7293
/**
7394
* Method to set the server url
7495
*
@@ -191,6 +212,31 @@ class CountlyConfig {
191212
return this;
192213
}
193214

215+
/**
216+
* Disables SDK behavior settings update requests.
217+
*/
218+
disableSDKBehaviorSettingsUpdates() {
219+
this.#disableSDKBehaviorSettingsUpdates = true;
220+
return this;
221+
}
222+
223+
/**
224+
* Disables the request backoff mechanism.
225+
*/
226+
disableBackoffMechanism() {
227+
this.#disableBackoff = true;
228+
return this;
229+
}
230+
231+
/**
232+
* Sets the SDK behavior settings.
233+
* @param {Object} settingsObject - SDK behavior settings object you can get from Countly server
234+
*/
235+
setSDKBehaviorSettings(settingsObject) {
236+
this.#sdkBehaviorSettings = settingsObject;
237+
return this;
238+
}
239+
194240
/**
195241
* Method to set the push token type
196242
* @deprecated

0 commit comments

Comments
 (0)