Skip to content

Commit 186e6f4

Browse files
authored
Release v2.2.13 (#10)
1 parent 605e8b5 commit 186e6f4

9 files changed

Lines changed: 221 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 2.2.13
9+
10+
### Added
11+
- Added the isAsyncConfigFetchEnabled API to enable/disable async config fetch optimization.
12+
13+
### Fixed
14+
- Fixed memory leaks in session recording service that could retain destroyed activities and services.
15+
816
## 2.2.12
917

1018
### Fixed

README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ DevRev SDK, used for integrating DevRev services into your Android app.
3131
- [Dynamic theme configuration](#dynamic-theme-configuration)
3232
- [Analytics](#analytics)
3333
- [Session analytics](#session-analytics)
34-
- [Opt in or out](#opt-in-or-out)
34+
- [Opt in or out](#opt-in-or-out)
3535
- [Session recording](#session-recording)
36+
- [Async config fetch](#async-config-fetch)
3637
- [Session properties](#session-properties)
3738
- [Mask sensitive data](#mask-sensitive-data)
3839
- [Mask using predefined tags](#mask-using-predefined-tags)
@@ -589,7 +590,7 @@ For example:
589590

590591
The DevRev SDK provides observability features to help you understand how your users are interacting with your app.
591592

592-
### Opt in or out
593+
#### Opt in or out
593594

594595
Session analytics features are opted-in by default, enabling them from the start. However, you can opt-out using the following method:
595596

@@ -675,6 +676,36 @@ To check if on-demand sessions are enabled, use:
675676
```java
676677
DevRevObservabilityExtKt.areOnDemandSessionsEnabled(DevRev.INSTANCE);
677678
```
679+
680+
#### Async config fetch
681+
682+
> [!NOTE]
683+
> The sessions will only be uploaded when the app is in the background.
684+
685+
The SDK can be configured to fetch configuration asynchronously to improve app startup time. When enabled, the SDK uses cached configuration for immediate startup and fetches fresh configuration from the server in the background.
686+
687+
> [!NOTE]
688+
> This setting should be called before `startRecording()` for it to take effect. Default is disabled for backward compatibility.
689+
690+
- Kotlin
691+
```kotlin
692+
DevRev.setAsyncConfigFetchEnabled(context, true)
693+
```
694+
- Java
695+
```java
696+
DevRevObservabilityExtKt.setAsyncConfigFetchEnabled(DevRev.INSTANCE, context, true);
697+
```
698+
699+
**Behavior when enabled:**
700+
- Uses cached config immediately to decide whether to start recording
701+
- If cached config says recording is disabled, recording won't start (respects dashboard setting)
702+
- Fetches fresh config in background without blocking startup
703+
- If fresh config disables recording after it started, recording stops immediately
704+
- Session uploads are deferred to when the app is in the background
705+
- Crash and ANR reports are prioritized and uploaded immediately
706+
- Regular session uploads occur sequentially (one at a time) to reduce network contention
707+
708+
This optimization is particularly beneficial for apps experiencing slow startup times on poor network connections.
678709
679710
#### Session properties
680711

docs/html/core/ai.devrev.sdk/-dev-rev/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,21 @@ <h2 class="tableheader">Functions</h2>
569569
</div>
570570
</div>
571571
</div>
572+
<a data-name="931310931%2FFunctions%2F-2055549142" anchor-label="setAsyncConfigFetchEnabled" id="931310931%2FFunctions%2F-2055549142" data-filterable-set=":core/main"></a>
573+
<div class="table-row table-row_content" data-togglable="EXTENSION_FUNCTION" data-filterable-current=":core/main" data-filterable-set=":core/main">
574+
<div class="main-subrow keyValue ">
575+
<div class=""><span class="inline-flex">
576+
<div><a href="../set-async-config-fetch-enabled.html"><span>set</span><wbr></wbr><span>Async</span><wbr></wbr><span>Config</span><wbr></wbr><span>Fetch</span><wbr></wbr><span><span>Enabled</span></span></a></div>
577+
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="931310931%2FFunctions%2F-2055549142"></span>
578+
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
579+
</span></span></div>
580+
<div>
581+
<div class="title">
582+
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core/main"><div class="symbol monospace"><span class="token keyword">fun </span><a href="index.html">DevRev</a><span class="token punctuation">.</span><a href="../set-async-config-fetch-enabled.html"><span class="token function">setAsyncConfigFetchEnabled</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">context<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/android/content/Context.html">Context</a><span class="token punctuation">, </span></span><span class="parameter ">enabled<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a></span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Enables or disables async config fetch optimization to improve app startup time.</p></div></div></div>
583+
</div>
584+
</div>
585+
</div>
586+
</div>
572587
<a data-name="517623941%2FFunctions%2F-2055549142" anchor-label="setCustomKey" id="517623941%2FFunctions%2F-2055549142" data-filterable-set=":core/main"></a>
573588
<div class="table-row table-row_content" data-filterable-current=":core/main" data-filterable-set=":core/main">
574589
<div class="main-subrow keyValue ">

docs/html/core/ai.devrev.sdk/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,21 @@ <h2 class="tableheader">Functions</h2>
422422
</div>
423423
</div>
424424
</div>
425+
<a data-name="931310931%2FFunctions%2F-2055549142" anchor-label="setAsyncConfigFetchEnabled" id="931310931%2FFunctions%2F-2055549142" data-filterable-set=":core/main"></a>
426+
<div class="table-row table-row_content" data-filterable-current=":core/main" data-filterable-set=":core/main">
427+
<div class="main-subrow keyValue ">
428+
<div class=""><span class="inline-flex">
429+
<div><a href="set-async-config-fetch-enabled.html"><span>set</span><wbr></wbr><span>Async</span><wbr></wbr><span>Config</span><wbr></wbr><span>Fetch</span><wbr></wbr><span><span>Enabled</span></span></a></div>
430+
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="931310931%2FFunctions%2F-2055549142"></span>
431+
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
432+
</span></span></div>
433+
<div>
434+
<div class="title">
435+
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core/main"><div class="symbol monospace"><span class="token keyword">fun </span><a href="-dev-rev/index.html">DevRev</a><span class="token punctuation">.</span><a href="set-async-config-fetch-enabled.html"><span class="token function">setAsyncConfigFetchEnabled</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">context<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/android/content/Context.html">Context</a><span class="token punctuation">, </span></span><span class="parameter ">enabled<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a></span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Enables or disables async config fetch optimization to improve app startup time.</p></div></div></div>
436+
</div>
437+
</div>
438+
</div>
439+
</div>
425440
<a data-name="-487263811%2FFunctions%2F-2055549142" anchor-label="setDeviceLocation" id="-487263811%2FFunctions%2F-2055549142" data-filterable-set=":core/main"></a>
426441
<div class="table-row table-row_content" data-filterable-current=":core/main" data-filterable-set=":core/main">
427442
<div class="main-subrow keyValue ">
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<!DOCTYPE html>
2+
<html class="no-js" lang="en">
3+
<head>
4+
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
5+
<title>setAsyncConfigFetchEnabled</title>
6+
<link href="../../images/logo-icon.svg" rel="icon" type="image/svg">
7+
<script>var pathToRoot = "../../";</script>
8+
<script>document.documentElement.classList.replace("no-js", "js");</script>
9+
<script>const storage = localStorage.getItem("dokka-dark-mode")
10+
if (storage == null) {
11+
const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
12+
if (osDarkSchemePreferred === true) {
13+
document.getElementsByTagName("html")[0].classList.add("theme-dark")
14+
}
15+
} else {
16+
const savedDarkMode = JSON.parse(storage)
17+
if (savedDarkMode === true) {
18+
document.getElementsByTagName("html")[0].classList.add("theme-dark")
19+
}
20+
}
21+
</script>
22+
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async="async"></script>
23+
<script type="text/javascript" src="../../scripts/sourceset_dependencies.js" async="async"></script>
24+
<link href="../../styles/style.css" rel="Stylesheet">
25+
<link href="../../styles/main.css" rel="Stylesheet">
26+
<link href="../../styles/prism.css" rel="Stylesheet">
27+
<link href="../../styles/logo-styles.css" rel="Stylesheet">
28+
<link href="../../ui-kit/ui-kit.min.css" rel="Stylesheet">
29+
<script type="text/javascript" src="../../scripts/safe-local-storage_blocking.js"></script>
30+
<script type="text/javascript" src="../../scripts/navigation-loader.js" async="async"></script>
31+
<script type="text/javascript" src="../../scripts/platform-content-handler.js" async="async"></script>
32+
<script type="text/javascript" src="../../scripts/main.js" defer="defer"></script>
33+
<script type="text/javascript" src="../../scripts/prism.js" async="async"></script>
34+
<script type="text/javascript" src="../../ui-kit/ui-kit.min.js" defer="defer"></script>
35+
</head>
36+
<body>
37+
<div class="root">
38+
<header class="navigation theme-dark" id="navigation-wrapper" role="banner">
39+
<a class="library-name--link" href="../../index.html" tabindex="1">
40+
core
41+
</a>
42+
<button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle"
43+
type="button">Toggle table of contents
44+
</button>
45+
<div class="navigation-controls--break ui-kit_mobile-only"></div>
46+
<div class="library-version" id="library-version">
47+
</div>
48+
<div class="navigation-controls">
49+
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
50+
<button class="platform-tag platform-selector jvm-like" data-active="" aria-pressed="true"
51+
data-filter=":core/main">androidJvm</button>
52+
<div class="dropdown filter-section--dropdown" data-role="dropdown" id="filter-section-dropdown">
53+
<button class="button button_dropdown filter-section--dropdown-toggle" role="combobox"
54+
data-role="dropdown-toggle"
55+
aria-controls="platform-tags-listbox"
56+
aria-haspopup="listbox"
57+
aria-expanded="false"
58+
aria-label="Toggle source sets"
59+
></button>
60+
<ul role="listbox" id="platform-tags-listbox" class="dropdown--list" data-role="dropdown-listbox" aria-label="Target filter">
61+
<div class="dropdown--header"><span>Target filter</span>
62+
<button class="button" data-role="dropdown-toggle" aria-label="Close target filter">
63+
<i class="ui-kit-icon ui-kit-icon_cross"></i>
64+
</button>
65+
</div>
66+
<li role="option" class="dropdown--option platform-selector-option jvm-like" tabindex="0">
67+
<label class="checkbox">
68+
<input type="checkbox" class="checkbox--input" id=":core/main"
69+
data-filter=":core/main"/>
70+
<span class="checkbox--icon"></span>
71+
androidJvm
72+
</label>
73+
</li>
74+
</ul>
75+
<div class="dropdown--overlay"></div>
76+
</div>
77+
</ul>
78+
<button class="navigation-controls--btn navigation-controls--btn_theme" id="theme-toggle-button"
79+
type="button">Switch theme
80+
</button>
81+
<div class="navigation-controls--btn navigation-controls--btn_search" id="searchBar" role="button">Search in
82+
API
83+
</div>
84+
</div>
85+
</header>
86+
<div id="container">
87+
<nav id="leftColumn" class="sidebar" data-item-type="SECTION" data-item-config='{"defaultSize": 280, "minSize": 200, "maxSize": 400}'>
88+
<a class="toc--skip-link" href="#main">Skip to content</a>
89+
<div class="dropdown theme-dark_mobile" data-role="dropdown" id="toc-dropdown">
90+
<ul role="listbox" id="toc-listbox" class="dropdown--list dropdown--list_toc-list"
91+
data-role="dropdown-listbox" aria-label="Table of contents">
92+
<div class="dropdown--header">
93+
<span>
94+
core
95+
</span>
96+
<button class="button" data-role="dropdown-toggle" aria-label="Close table of contents">
97+
<i class="ui-kit-icon ui-kit-icon_cross"></i>
98+
</button>
99+
</div>
100+
<div class="sidebar--inner" id="sideMenu"></div>
101+
</ul>
102+
<div class="dropdown--overlay"></div>
103+
</div>
104+
</nav>
105+
<div id="resizer" class="resizer" data-item-type="BAR"></div>
106+
<div id="main" data-item-type="SECTION" role="main">
107+
<div class="main-content" data-page-type="member" id="content" pageIds="core::ai.devrev.sdk//setAsyncConfigFetchEnabled/ai.devrev.sdk.DevRev#android.content.Context#kotlin.Boolean/PointingToDeclaration//-2055549142">
108+
<div class="breadcrumbs"><a href="../../index.html">core</a><span class="delimiter">/</span><a href="index.html">ai.devrev.sdk</a><span class="delimiter">/</span><span class="current">setAsyncConfigFetchEnabled</span></div>
109+
<div class="cover ">
110+
<h1 class="cover"><span>set</span><wbr></wbr><span>Async</span><wbr></wbr><span>Config</span><wbr></wbr><span>Fetch</span><wbr></wbr><span><span>Enabled</span></span></h1>
111+
</div>
112+
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core/main"><div class="symbol monospace"><span class="token keyword">fun </span><a href="-dev-rev/index.html">DevRev</a><span class="token punctuation">.</span><a href="set-async-config-fetch-enabled.html"><span class="token function">setAsyncConfigFetchEnabled</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">context<span class="token operator">: </span><a href="https://developer.android.com/reference/kotlin/android/content/Context.html">Context</a><span class="token punctuation">, </span></span><span class="parameter ">enabled<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html">Boolean</a></span></span><span class="token punctuation">)</span></div><p class="paragraph">Enables or disables async config fetch optimization to improve app startup time.</p><p class="paragraph">When enabled, the SDK uses cached configuration for immediate startup and fetches fresh configuration from the server in the background. This significantly improves app startup time on slow networks.</p><p class="paragraph"><strong>Behavior when enabled:</strong></p><ul><li><p class="paragraph">Uses cached config immediately to decide whether to start recording</p></li><li><p class="paragraph">If cached config says recording disabled, recording won't start (respects dashboard setting)</p></li><li><p class="paragraph">Fetches fresh config in background without blocking startup</p></li><li><p class="paragraph">If fresh config disables recording after it started, recording stops immediately</p></li></ul><p class="paragraph"><strong>Important:</strong> This should be called before <a href="start-recording.html">startRecording</a> for the setting to take effect. Default is disabled (false) for backward compatibility.</p><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":core/main" data-filterable-set=":core/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>context</span></span></u></div></span></div><div><div class="title"><p class="paragraph">An application context</p></div></div></div></div><div class="table-row table-row_content" data-filterable-current=":core/main" data-filterable-set=":core/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>enabled</span></span></u></div></span></div><div><div class="title"><p class="paragraph">true to enable async config fetch, false to use blocking fetch (default)</p></div></div></div></div></div></div></div>
113+
</div>
114+
<div class="footer">
115+
<div class="footer--container">
116+
<a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
117+
<div class="footer--content">
118+
<div>
119+
<span>Generated by </span>
120+
<a class="footer--link footer--link_external" href="https://github.com/Kotlin/dokka">
121+
Dokka
122+
</a>
123+
<div>© 2026 Copyright</div>
124+
</div>
125+
</div>
126+
</div>
127+
</div>
128+
</div>
129+
</div>
130+
</div>
131+
</body>
132+
</html>

docs/html/core/package-list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ $dokka.location:ai.devrev.sdk//resumeRecording/ai.devrev.sdk.DevRev#/PointingToD
401401
$dokka.location:ai.devrev.sdk//resumeUserInteractionTracking/ai.devrev.sdk.DevRev#/PointingToDeclaration/core/ai.devrev.sdk/resume-user-interaction-tracking.html
402402
$dokka.location:ai.devrev.sdk//sendException/ai.devrev.sdk.DevRev#kotlin.Throwable#kotlin.String/PointingToDeclaration/core/ai.devrev.sdk/send-exception.html
403403
$dokka.location:ai.devrev.sdk//setAppFrameworkInfo/ai.devrev.sdk.DevRev#android.content.Context#kotlin.String#kotlin.String/PointingToDeclaration/core/ai.devrev.sdk/set-app-framework-info.html
404+
$dokka.location:ai.devrev.sdk//setAsyncConfigFetchEnabled/ai.devrev.sdk.DevRev#android.content.Context#kotlin.Boolean/PointingToDeclaration/core/ai.devrev.sdk/set-async-config-fetch-enabled.html
404405
$dokka.location:ai.devrev.sdk//setDeviceLocation/ai.devrev.sdk.DevRev#kotlin.Double#kotlin.Double/PointingToDeclaration/core/ai.devrev.sdk/set-device-location.html
405406
$dokka.location:ai.devrev.sdk//setInScreenTransitioning/ai.devrev.sdk.DevRev#kotlin.Boolean/PointingToDeclaration/core/ai.devrev.sdk/set-in-screen-transitioning.html
406407
$dokka.location:ai.devrev.sdk//setMaskLocationProvider/ai.devrev.sdk.DevRev#com.userexperior.bridge.model.MaskLocationProvider/PointingToDeclaration/core/ai.devrev.sdk/set-mask-location-provider.html

0 commit comments

Comments
 (0)