Skip to content

Commit 81e257f

Browse files
authored
Apply suggestions from code review
1 parent 3de5eb1 commit 81e257f

File tree

1 file changed

+5
-9
lines changed
  • src/connections/sources/catalog/libraries/mobile/kotlin-android

1 file changed

+5
-9
lines changed

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To get started with the Analytics-Kotlin mobile library:
2525
2. Search for **Kotlin (Android)** and click **Add source**.
2626
2. Add the Analytics dependency to your build.gradle.
2727

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"}
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 on Segment's [releases page](https://github.com/segmentio/analytics-kotlin/releases){:target="_blank"}
2929

3030
```
3131
repositories {
@@ -51,10 +51,8 @@ To get started with the Analytics-Kotlin mobile library:
5151
}
5252
```
5353
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-
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.
54+
**Note:** If you're on an Android platform, you must add the application context as the second parameter.
55+
<br>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.
5856
5957
<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.
6058
@@ -86,11 +84,9 @@ To get started with the Analytics-Kotlin mobile library:
8684
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
8785
```
8886
89-
5. Enable Java 8+ API desugaring
87+
5. Enable Java 8+ API desugaring.
9088
91-
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.
89+
The SDK internally uses a number of Java 8 language APIs through desugaring. Make sure your project either [enables desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring)) or requires a minimum API level of 26.
9490
9591
## Tracking Methods
9692

0 commit comments

Comments
 (0)