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
Clickstream Android SDK can help you easily report in-app events on Android. After the event is reported, statistics and analysis of specific scenario data can be completed on AWS Clickstream solution.
5
6
6
7
The SDK relies on the Amplify for Android SDK Core Library and is developed according to the Amplify Android SDK plug-in specification, while using the same event definitions and attribute specifications as amplifyframework analytics. In addition to this, we've added commonly used preset event statistics to make it easier to use.
@@ -9,26 +10,200 @@ The SDK relies on the Amplify for Android SDK Core Library and is developed acco
9
10
10
11
The Clickstream SDK supports Android API level 16 (Android 4.1) and above.
11
12
13
+
## Integrate SDK
14
+
15
+
**1.Include SDK**
16
+
17
+
Add the following dependency to your `app` module's `build.gradle` file.
Current login user‘s attributes will be cached in disk, so the next time app launch you don't need to set all user's attribute again, of course you can update the current user's attribute when it changes.
after config `.withLogEvents(true)` and when you record an event, you can see the event json at your AndroidStudio **Logcat** by filter `EventRecorder`.
If you want to use custom DNS for network request, you can create your `CustomOkhttpDns` which implementaion `okhttp3.Dns`, then config `.withCustomDns(CustomOkhttpDns.getInstance())` to make it works.
195
+
196
+
#### Send event immediately
197
+
198
+
```java
199
+
// for send event immediately.
200
+
ClickstreamAnalytics.flushEvent();
201
+
```
202
+
12
203
## How to build locally
13
-
### Config your local environment
14
-
First of all you should install the latest version of [Android Studio](https://developer.android.com/studio).
15
-
#### Config your checkstyle:
16
-
1. Open your Android Studio -> Preferences -> Tools -> check style window.
17
-
2. Change the check style version to 8.29.
18
-
3. Add config file from ./configuration/checkstyle.gradle. then check and apply.
19
-
20
-
#### Config your code format
21
-
1. Open your Android Studio -> Preferences -> Editor -> Code Style -> Java window.
22
-
2. Click the top setting icon -> import scheme -> checkstyle configuration
23
-
3. Select ./configuration/checkstyle.gradle file, then click ok to submit.
24
-
4. Config your Reformat code keymap to format your code with checkstyle configured above.
25
-
26
-
#### Config your java version
27
-
1. Open your Android Studio -> Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle window.
28
-
2. make sure you `Gradle JDK` version is set to the 1.8, then click apply and ok.
29
-
30
-
### Build aar
31
-
open an terminal window,at the root project folder to execute:
204
+
205
+
open an terminal window, at the root project folder to execute:
0 commit comments