Skip to content

Commit

Permalink
Merge pull request #19 from Tealium/mt-909
Browse files Browse the repository at this point in the history
Updated appsflyer version and updated some method calls that changed
  • Loading branch information
trister1997 authored Mar 14, 2022
2 parents d7b8dc6 + 3c30201 commit 8008344
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion appsflyer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.2'
api 'com.tealium:remotecommands:1.0.0'
implementation 'com.appsflyer:af-android-sdk:5.4.3'
implementation 'com.appsflyer:af-android-sdk:6.5.3'
implementation 'com.android.installreferrer:installreferrer:1.1.2'

testImplementation 'junit:junit:4.12'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ class AppsFlyerInstance(
}

override fun trackLocation(latitude: Double, longitude: Double) {
AppsFlyerLib.getInstance().trackLocation(application, latitude, longitude)
AppsFlyerLib.getInstance().logLocation(application, latitude, longitude)
}

override fun trackEvent(eventType: String, eventParameters: Map<String, Any>?) {
AppsFlyerLib.getInstance().trackEvent(application, eventType, eventParameters)
AppsFlyerLib.getInstance().logEvent(application, eventType, eventParameters)
}

override fun setHost(host: String, hostPrefix: String?) {
Expand All @@ -95,7 +95,7 @@ class AppsFlyerInstance(
}

override fun disableDeviceTracking(disable: Boolean) {
AppsFlyerLib.getInstance().setDeviceTrackingDisabled(disable)
AppsFlyerLib.getInstance().anonymizeUser(disable)
}

override fun resolveDeepLinkUrls(links: List<String>) {
Expand All @@ -104,15 +104,15 @@ class AppsFlyerInstance(
}

override fun stopTracking(isTrackingStopped: Boolean) {
AppsFlyerLib.getInstance().stopTracking(isTrackingStopped, application.applicationContext)
AppsFlyerLib.getInstance().stop(isTrackingStopped, application.applicationContext)
}

fun setMinsBetweenSessions(seconds: Int) {
AppsFlyerLib.getInstance().setMinTimeBetweenSessions(seconds)
}

fun anonymizeUser(isDisabled: Boolean) {
AppsFlyerLib.getInstance().setDeviceTrackingDisabled(isDisabled)
AppsFlyerLib.getInstance().anonymizeUser(isDisabled)
}

fun addCustomData(data: HashMap<String, Any>) {
Expand Down Expand Up @@ -146,7 +146,7 @@ class AppsFlyerInstance(
application.applicationContext
)
AppsFlyerLib.getInstance()
.startTracking(weakActivity?.get() ?: application.applicationContext)
.start(weakActivity?.get() ?: application.applicationContext)
}

private fun getApplication() {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
buildscript {
ext.kotlin_version = '1.4.10'
ext.mockk_version = '1.9'
ext.tealium_appsflyer_version = '1.1.0'
ext.tealium_appsflyer_version = '1.2.0'

repositories {
google()
Expand Down

0 comments on commit 8008344

Please sign in to comment.