diff --git a/build.gradle b/build.gradle index d8f2288..a496d9a 100644 --- a/build.gradle +++ b/build.gradle @@ -42,5 +42,5 @@ android { dependencies { testImplementation files('libs/java-json.jar') - api 'com.adjust.sdk:adjust-android:4.33.3' + api 'com.adjust.sdk:adjust-android:4.38.3' } diff --git a/src/main/kotlin/com/mparticle/kits/AdjustKit.kt b/src/main/kotlin/com/mparticle/kits/AdjustKit.kt index 8130f51..475ce06 100644 --- a/src/main/kotlin/com/mparticle/kits/AdjustKit.kt +++ b/src/main/kotlin/com/mparticle/kits/AdjustKit.kt @@ -51,6 +51,10 @@ class AdjustKit : KitIntegration(), OnAttributionChangedListener, ActivityLifecy config.setLogLevel(LogLevel.VERBOSE) } config.setEventBufferingEnabled(false) + val fbAppId = getSettings()[FB_APP_ID_KEY] + if (fbAppId != null) { + config.setFbAppId(fbAppId); + } Adjust.onCreate(config) setAdidIntegrationAttribute() (context.applicationContext as Application).registerActivityLifecycleCallbacks(this) @@ -117,6 +121,7 @@ class AdjustKit : KitIntegration(), OnAttributionChangedListener, ActivityLifecy companion object { private const val APP_TOKEN = "appToken" private const val ADJUST_ID_KEY = "adid" + private const val FB_APP_ID_KEY = "fbAppId" private const val KIT_NAME = "Adjust" var deeplinkResponseListenerProxy: OnDeeplinkEventListener? = null diff --git a/src/test/kotlin/com/mparticle/kits/AdjustKitTests.kt b/src/test/kotlin/com/mparticle/kits/AdjustKitTests.kt index 16a7641..d0a7382 100644 --- a/src/test/kotlin/com/mparticle/kits/AdjustKitTests.kt +++ b/src/test/kotlin/com/mparticle/kits/AdjustKitTests.kt @@ -33,6 +33,14 @@ class AdjustKitTests { val kit = kit val settings = HashMap() settings["fake setting"] = "fake" + val appToken = AdjustKit::class.java.getDeclaredField("APP_TOKEN") + appToken.isAccessible = true + val token = appToken.get(AdjustKit.Companion) as String + settings[token] = "test1" + val fbAppId = AdjustKit::class.java.getDeclaredField("FB_APP_ID_KEY") + fbAppId.isAccessible = true + val fbId = fbAppId.get(AdjustKit.Companion) as String + settings[fbId] = "test2" kit.onKitCreate(settings, Mockito.mock(Context::class.java)) } catch (ex: Exception) { e = ex