File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
packages/core/android/src/main/java/com/segment/analytics/reactnative/core Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -134,11 +134,17 @@ class RNAnalyticsModule(context: ReactApplicationContext): ReactContextBaseJavaM
134
134
builder.trackAttributionInformation()
135
135
}
136
136
137
- if (options.hasKey(" flushInterval" )) {
138
- builder.flushInterval(
139
- options.getInt(" flushInterval" ).toLong(),
140
- TimeUnit .MILLISECONDS
141
- )
137
+ if (options.hasKey(" android" ) && options.getType(" android" ) == ReadableType .Map ) {
138
+ val androidOptions = options.getMap(" android" )!!
139
+ if (androidOptions.hasKey(" flushInterval" )) {
140
+ builder.flushInterval(
141
+ androidOptions.getInt(" flushInterval" ).toLong(),
142
+ TimeUnit .MILLISECONDS
143
+ )
144
+ }
145
+ if (androidOptions.hasKey(" collectDeviceId" )) {
146
+ builder.collectDeviceId(androidOptions.getBoolean(" collectDeviceId" ))
147
+ }
142
148
}
143
149
144
150
if (options.getBoolean(" debug" )) {
You can’t perform that action at this time.
0 commit comments