Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/main/kotlin/com/mparticle/kits/RoktKit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class RoktKit :
CommerceListener,
IdentityListener,
RoktListener,
KitIntegration.BatchListener,
Rokt.RoktCallback {
private var applicationContext: Context? = null
private var mpRoktEventCallback: MpRoktEventCallback? = null
Expand Down Expand Up @@ -135,6 +136,18 @@ class RoktKit :

override fun logEvent(commerceEvent: CommerceEvent): List<ReportingMessage> = emptyList()

/*
* Overrides for BatchListener
*/
override fun logBatch(jsonObject: org.json.JSONObject): List<ReportingMessage> {
try {
Rokt.receiveMParticleBatch(jsonObject.toString())
} catch (e: Exception) {
Logger.warning("RoktKit: Failed to forward batch to Rokt: ${e.message}")
}
return emptyList()
}

/*
* Overrides for IdentityListener
*/
Expand Down
Loading