SDK Integration
Install, configure, and debug the MMP SDK across platforms
1. Add Gradle Dependency
// build.gradle (app level)
dependencies {
implementation 'com.tekiestech.mmp:sdk-android:2.4.1'
}2. Initialize SDK in Application Class
// MyApplication.kt
import com.tekiestech.mmp.MmpSdk
import com.tekiestech.mmp.MmpConfig
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
val config = MmpConfig.Builder("YOUR_SDK_KEY")
.setEnvironment(MmpConfig.ENV_PRODUCTION)
.enableAutoTracking(true)
.setLogLevel(MmpConfig.LOG_VERBOSE)
.build()
MmpSdk.initialize(this, config)
}
}3. Track Events
// Track a custom event
MmpSdk.trackEvent("purchase", mapOf(
"product_id" to "sku_12345",
"price" to 29.99,
"currency" to "USD",
"category" to "electronics"
))
// Track revenue event
MmpSdk.trackRevenue("purchase", 29.99, "USD", mapOf(
"product_id" to "sku_12345"
))4. ProGuard Rules
# ProGuard rules for MMP SDK
-keep class com.tekiestech.mmp.** { *; }
-keepattributes Signature
-keepattributes *Annotation*
-dontwarn com.tekiestech.mmp.**SDK Configuration
Auto-Tracking
Sessions
Screen Views
Crash Reporting