Skip to content

Commit 6df63b3

Browse files
committed
add reset
1 parent 78c6581 commit 6df63b3

File tree

2 files changed

+44
-6
lines changed
  • src/connections/sources/catalog/libraries

2 files changed

+44
-6
lines changed

src/connections/sources/catalog/libraries/mobile/kotlin-android/index.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,25 @@ analytics.group("user-123", buildJsonObject {
203203
{% endcodeexampletab %}
204204
{% endcodeexample %}
205205

206+
## Utility Methods
207+
208+
### Reset
209+
The `reset` method clears the SDK’s internal stores for the current user and group. This is useful for apps where users log in and out with different identities on the same device over time.
210+
211+
{% codeexample %}
212+
{% codeexampletab Method signature %}
213+
```java
214+
fun reset()
215+
```
216+
{% endcodeexampletab %}
217+
218+
{% codeexampletab Example use %}
219+
```java
220+
analytics.reset()
221+
```
222+
{% endcodeexampletab %}
223+
{% endcodeexample %}
224+
206225
## Plugin Architecture
207226
Segment's plugin architecture enables you to modify and augment how the analytics client works. From modifying event payloads to changing analytics functionality, plugins help to speed up the process of getting things done.
208227

src/connections/sources/catalog/libraries/server/kotlin/index.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ To get started with the Analytics-Kotlin server library:
2525
Segment recommends you to install the library with a build system like Gradle, as it simplifies the process of upgrading versions and adding integrations. The library is distributed through [Maven Central](https://repo1.maven.org/maven2/com/segment/analytics/kotlin/android/){:target="_blank"}. Add the analytics module to your build.gradle as a dependency as shown in the code sample below, and replace `<latest_version>` with the latest version listed on Segment's [releases page](https://github.com/segmentio/analytics-kotlin/releases){:target="_blank"}
2626

2727
```java
28-
repositories {
29-
maven { url 'https://jitpack.io' }
30-
}
31-
dependencies {
32-
implementation 'com.github.segmentio.analytics-kotlin:core:+'
33-
}
28+
repositories {
29+
mavenCentral()
30+
}
31+
dependencies {
32+
implementation 'com.segment.analytics.kotlin:core:<latest_version>'
33+
}
3434
```
3535
3. Initialize and configure the client.
3636

@@ -176,6 +176,25 @@ analytics.group("user-123", buildJsonObject {
176176
{% endcodeexampletab %}
177177
{% endcodeexample %}
178178

179+
## Utility Methods
180+
181+
### Reset
182+
The `reset` method clears the SDK’s internal stores for the current user and group. This is useful for apps where users log in and out with different identities on the same device over time.
183+
184+
{% codeexample %}
185+
{% codeexampletab Method signature %}
186+
```java
187+
fun reset()
188+
```
189+
{% endcodeexampletab %}
190+
191+
{% codeexampletab Example use %}
192+
```java
193+
analytics.reset()
194+
```
195+
{% endcodeexampletab %}
196+
{% endcodeexample %}
197+
179198
## Plugin Architecture
180199
Segment's plugin architecture enables you to modify and augment how the analytics client works. From modifying event payloads to changing analytics functionality, plugins help to speed up the process of getting things done.
181200

0 commit comments

Comments
 (0)