adjust 获取 gaid
This commit is contained in:
parent
466e83dadd
commit
c7482eda72
|
|
@ -10,6 +10,9 @@ import com.adjust.sdk.AdjustConfig
|
||||||
import com.adjust.sdk.AdjustEvent
|
import com.adjust.sdk.AdjustEvent
|
||||||
import com.adjust.sdk.LogLevel
|
import com.adjust.sdk.LogLevel
|
||||||
import com.adjust.sdk.OnAttributionChangedListener
|
import com.adjust.sdk.OnAttributionChangedListener
|
||||||
|
import com.adjust.sdk.OnGoogleAdIdReadListener
|
||||||
|
import com.adjust.sdk.OnSessionTrackingFailedListener
|
||||||
|
import com.adjust.sdk.OnSessionTrackingSucceededListener
|
||||||
import com.ama.core.architecture.BaseApp
|
import com.ama.core.architecture.BaseApp
|
||||||
import com.ama.core.architecture.util.AndroidUtil
|
import com.ama.core.architecture.util.AndroidUtil
|
||||||
import com.ama.core.architecture.util.SpUtil
|
import com.ama.core.architecture.util.SpUtil
|
||||||
|
|
@ -85,8 +88,16 @@ class AdjustManager private constructor() {
|
||||||
val config = AdjustConfig(mAppContext, appToken, environment).apply {
|
val config = AdjustConfig(mAppContext, appToken, environment).apply {
|
||||||
setLogLevel(if (isDebug) LogLevel.VERBOSE else LogLevel.WARN)
|
setLogLevel(if (isDebug) LogLevel.VERBOSE else LogLevel.WARN)
|
||||||
enableSendingInBackground()
|
enableSendingInBackground()
|
||||||
enableCoppaCompliance()
|
/*enableCoppaCompliance()
|
||||||
enableCostDataInAttribution()
|
enableCostDataInAttribution()*/
|
||||||
|
|
||||||
|
onSessionTrackingFailedListener = OnSessionTrackingFailedListener { failSession ->
|
||||||
|
val test = 111
|
||||||
|
}
|
||||||
|
|
||||||
|
onSessionTrackingSucceededListener = OnSessionTrackingSucceededListener {
|
||||||
|
val test = 111
|
||||||
|
}
|
||||||
|
|
||||||
onAttributionChangedListener = OnAttributionChangedListener { attribution->
|
onAttributionChangedListener = OnAttributionChangedListener { attribution->
|
||||||
val test = 111
|
val test = 111
|
||||||
|
|
@ -97,6 +108,10 @@ class AdjustManager private constructor() {
|
||||||
Adjust.initSdk(config)
|
Adjust.initSdk(config)
|
||||||
Adjust.enable()
|
Adjust.enable()
|
||||||
|
|
||||||
|
Adjust.getGoogleAdId(BaseApp.appContext(), OnGoogleAdIdReadListener { gaId->
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
if (!mSpHelper.hasIdentityUserType()) {
|
if (!mSpHelper.hasIdentityUserType()) {
|
||||||
mChecker.startPolling()
|
mChecker.startPolling()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue