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
Add the following dependency to your `app` module's `build.gradle` file.
22
22
@@ -28,7 +28,7 @@ dependencies {
28
28
29
29
then sync your project, if you have problem to build your app, please check [troubleshooting](#Troubleshooting)
30
30
31
-
**2.Parameter configuration**
31
+
### 2. Parameter configuration
32
32
33
33
Find the res directory under your `project/app/src/main` , and manually create a raw folder in the res directory.
34
34
@@ -41,7 +41,7 @@ Download your `amplifyconfiguration.json` file from your clickstream control pla
41
41
"analytics": {
42
42
"plugins": {
43
43
"awsClickstreamPlugin": {
44
-
"appId": "appId",
44
+
"appId": "your appId",
45
45
"endpoint": "https://example.com/collect",
46
46
"isCompressEvents": true,
47
47
"autoFlushEventsInterval": 10000,
@@ -60,16 +60,16 @@ Your `appId` and `endpoint` are already set up in it, here's an explanation of e
60
60
-**autoFlushEventsInterval**: event sending interval, the default is `10s`
61
61
-**isTrackAppExceptionEvents**: whether auto track exception event in app, default is `false`
62
62
63
-
**3.Initialize the SDK**
63
+
### 3. Initialize the SDK
64
64
65
-
It is recommended that you initialize the SDK in the Application`onCreate()` method. Please note that the initialization code needs to run in the main thread.
65
+
It is recommended that you initialize the SDK in your application's`onCreate()` method. Please note that the initialization code needs to run in the main thread.
66
66
67
+
#### 3.1 Initialize the SDK with default configuration
Log.e("MyApp", "Could not initialize ClickstreamAnalytics", error);
101
+
}
102
+
}
103
+
```
104
+
By default, we will use the configurations in `amplifyconfiguration.json` file. If you add a custom configuration, the added configuration items will override the default values.
81
105
82
-
**4.Config the SDK**
106
+
You can also add all the configuration parameters you need in the `init` method without using the `amplifyconfiguration.json` file.
83
107
84
-
After initial the SDK we can use the following code to custom configure it.
108
+
### 4. Update Configuration
109
+
110
+
After initial the SDK we can use the following code to up configure it.
0 commit comments