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: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,8 @@ NOTE: If you use pure Java codebase, please refer to [Java Compatibility](JAVA_C
49
49
50
50
You can find usage documentation at [https://segment.com/docs/sources/mobile/kotlin-android/](https://segment.com/docs/sources/mobile/kotlin-android/).
51
51
52
+
Explore more via the [example projects](samples) which showcase analytics instrumentation on different platforms/languages and usage of plugins. These projects contain sample [plugins](samples/kotlin-android-app/src/main/java/com/segment/analytics/next/plugins) and [destination plugins](samples/kotlin-android-app-destinations/src/main/java/com/segment/analytics/destinations/plugins)
53
+
52
54
## Contributing
53
55
54
56
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
A sample project showcasing the usage of `analytics-kotlin` in a pure java codebase Android application
5
+
6
+
-[Kotlin Android Application](kotlin-android-app)
7
+
A sample project showcasing the usage of `analytics-kotlin` in a pure kotlin codebase Android application. Also contains sample plugins that are commonly used.
A sample project showcasing the usage of `analytics-kotlin` in a pure kotlin codebase Android application. This project also hosts sample Destination plugins, and instructions on how to include them in your own projects
11
+
12
+
-[Kotlin JVM Application](kotlin-jvm-app)
13
+
A sample project showcasing the usage of `analytics-kotlin` in a pure kotlin codebase JVM application.
Copy file name to clipboardExpand all lines: samples/kotlin-android-app-destinations/README.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,23 @@
2
2
This is a sample android app that uses the `analytics-kotlin` library and the new `Plugins` concepts. It is meant to be simplistic, and easy to understand all the while showcasing the power of the analytics-kotlin library
An after plugin that allows you to send the event from the analytics timeline to a webhook of your choice. Ideal for debugging payloads in an internal network.
Copy file name to clipboardExpand all lines: samples/kotlin-android-app/README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,18 @@
2
2
This is a sample android app that uses the `analytics-kotlin` library and the new `Plugins` concepts. It is meant to be simplistic, and easy to understand all the while showcasing the power of the analytics-kotlin library
Using the `play-services-ads` library this plugin adds the `advertisingId` to all payloads (under the `context` key) going through the analytics timeline
7
7
8
-
- Android Record Screen Plugin
8
+
-[Android Record Screen Plugin](src/main/java/com/segment/analytics/next/plugins/AndroidRecordScreenPlugin.kt)
9
9
Using the application lifecycle, this plugin automatically sends `Screen` events through the analytics timeline, on Activity start
Presents user with a dialog to consent to tracking. If consent is given, any queued events will be sent out to the analytics timeline. If consent is not given, all queued events and future events will be dropped
13
13
** Note: You will have to switch to the `ConsentActivity` inside of AndroidManifest.xml to view this feature **
14
14
15
-
-Webhook Plugin
16
-
A destination plugin that allows you to send the event from the analytics timeline to a webhook of your choice. Ideal for debugging payloads in an internal network.
Using Firebase Service for push notifications this plugin hooks into the activity start lifecycle method and fires Push Notification track events.
17
17
18
18
## Tracking Deep Links
19
19
The sample app is configured to open links with the schema and hostname `https://segment-sample.com`
@@ -23,7 +23,7 @@ Here is how you can do it via adb
23
23
adb shell am start -W -a android.intent.action.VIEW -d "https://segment-sample.com?utm_source=cli\&utm_click=2" com.segment.analytics.next
24
24
```
25
25
26
-
## FCM
26
+
## Firebase Cloud Messaging
27
27
This project is setup to track push notification received and opened events. This code is strictly optional and must be customized as per your needs. The code here is only for demonstration purposes
28
28
### Setup
29
29
- Add your FCM project's `google-services.json` to this folder
0 commit comments