Android

Before you begin

If you haven't already, add Adrop to Android and make sure that Adrop Metrics is enabled in your project

Initialize Adrop

// 1. use Application Context
// 2. true for production
// 3. If you are using this SDK in specific countries, 
//    pass an array of ISO 3166 alpha-2 country codes.
Adrop.initialize(
    application, 
    production = false,
    targetCountries = arrayOf<String>())

Log Events

You can log custom event to define the users of your app. Read more about the AdropMetrics.

val params = AdropEventParam.Builder()
    .putInt("data_key_1", 1)
    .putFloat("data_key_2", 1.2)
    .putBoolean("data_key_3", true)
    .putString("data_key_4", "value_text")
    .build()

AdropMetrics.logEvent("event_name", params)

Last updated