You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/mobile/kotlin-android/index.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ To get started with the Analytics-Kotlin mobile library:
25
25
2. Search for **Kotlin (Android)** and click **Add source**.
26
26
2. Add the Analytics dependency to your build.gradle.
27
27
28
-
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://search.maven.org/search?q=g:com.segment.analytics.kotlin){: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 in [Maven Central](https://search.maven.org/search?q=g:com.segment.analytics.kotlin){:target="_blank"}
28
+
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 in our [releases page](https://github.com/segmentio/analytics-kotlin/releases){:target="_blank"}
29
29
30
30
```
31
31
repositories {
@@ -51,6 +51,9 @@ To get started with the Analytics-Kotlin mobile library:
51
51
}
52
52
```
53
53
54
+
> warning ""
55
+
> **Note:** In android, application context is required to pass as the second parameter, or an error `Using JVM Analytics initializer in Android platform. Context is required in constructor!` will be thrown out.
56
+
54
57
Automatically tracking lifecycle events (`Application Opened`, `Application Installed`, `Application Updated`) is optional, but Segment highly recommends you to configure these options in order to track core events.
55
58
56
59
<br>**Note:** Unlike the Analytics-Android SDK, the Analytics-Kotlin SDK doesn’t provide a singleton instance and relies on you to keep track of the instance.
@@ -83,6 +86,12 @@ To get started with the Analytics-Kotlin mobile library:
The SDK internally uses a number of Java 8 language APIs through desugaring. Please make sure your project:
92
+
* either enables desugaring (see how to enable it [here](https://developer.android.com/studio/write/java8-support#library-desugaring))
93
+
* or requires a minimum API level of 26.
94
+
86
95
## Tracking Methods
87
96
88
97
Once you’ve installed the mobile or server Analytics-Kotlin library, you can start collecting data through Segment’s tracking methods:
@@ -439,8 +448,8 @@ To test your destination:
439
448
440
449
Segment recommends you to test your destination implementation end-to-end. Send some sample analytics events and ensure that they reach the destination.
441
450
442
-
## Changelog
443
-
[View the Analytics-Kotlin changelog on GitHub](https://github.com/segmentio/analytics-kotlin/releases).
444
-
445
451
## Compatibility
446
452
[View the Analytics-Kotlin compatibility notes on GitHub](https://github.com/segmentio/analytics-kotlin#compatibility).
453
+
454
+
## Changelog
455
+
[View the Analytics-Kotlin changelog on GitHub](https://github.com/segmentio/analytics-kotlin/releases).
0 commit comments