@@ -8,6 +8,7 @@ import android.graphics.Typeface
8
8
import android.os.Build
9
9
import com.mparticle.commerce.CommerceEvent
10
10
import com.mparticle.identity.MParticleUser
11
+ import com.mparticle.internal.Constants
11
12
import com.mparticle.internal.Logger
12
13
import com.mparticle.kits.KitIntegration.CommerceListener
13
14
import com.mparticle.kits.KitIntegration.IdentityListener
@@ -141,8 +142,10 @@ class RoktKit : KitIntegration(), CommerceListener, IdentityListener, RoktListen
141
142
onShouldHideLoadingIndicatorCallback = onShouldHideLoadingIndicator
142
143
onShouldShowLoadingIndicatorCallback = onShouldShowLoadingIndicator
143
144
val finalAttributes: HashMap <String , String > = HashMap <String , String >()
145
+ Logger .error(" userAttributes -> " + filterUser?.toString())
144
146
filterUser?.userAttributes?.let { userAttrs ->
145
147
for ((key, value) in userAttrs) {
148
+ Logger .error(" userAttrs -> $key : $value " )
146
149
finalAttributes[key] = value.toString()
147
150
}
148
151
}
@@ -155,6 +158,12 @@ class RoktKit : KitIntegration(), CommerceListener, IdentityListener, RoktListen
155
158
Logger .warning(" RoktKit: No user ID available for placement" )
156
159
}
157
160
161
+
162
+ val SANDBOX_MODE_ROKT : String = " sandbox"
163
+ attributes?.get(SANDBOX_MODE_ROKT )?.let { value ->
164
+ finalAttributes.put(SANDBOX_MODE_ROKT , value)
165
+ }
166
+
158
167
Rokt .execute(
159
168
viewName,
160
169
finalAttributes,
@@ -184,19 +193,19 @@ class RoktKit : KitIntegration(), CommerceListener, IdentityListener, RoktListen
184
193
const val NO_APP_VERSION_FOUND = " No App version found, can't initialize kit."
185
194
}
186
195
187
- override fun onLoad () : Unit {
196
+ override fun onLoad (): Unit {
188
197
onLoadCallback?.run ()
189
198
}
190
199
191
- override fun onShouldHideLoadingIndicator () : Unit {
200
+ override fun onShouldHideLoadingIndicator (): Unit {
192
201
onShouldHideLoadingIndicatorCallback?.run ()
193
202
}
194
203
195
- override fun onShouldShowLoadingIndicator () : Unit {
204
+ override fun onShouldShowLoadingIndicator (): Unit {
196
205
onShouldShowLoadingIndicatorCallback?.run ()
197
206
}
198
207
199
- override fun onUnload (reason : Rokt .UnloadReasons ) : Unit {
208
+ override fun onUnload (reason : Rokt .UnloadReasons ): Unit {
200
209
onUnloadCallback?.run ()
201
210
}
202
211
}
0 commit comments