Skip to content

Commit

Permalink
[MT-1139] Update appsflyer version range (#21)
Browse files Browse the repository at this point in the history
[MT-1139] Update appsflyer version range

Co-authored-by: Karen Tamayo <[email protected]>
  • Loading branch information
tamayok and Karen Tamayo authored Oct 4, 2022
1 parent ccf2352 commit db1917b
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 30 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ For full documentation, please see the Tealium Learning Community:
Use of this software is subject to the terms and conditions of the license agreement contained in the file titled "LICENSE.txt". Please read the license before downloading or using any of the files contained in this repository. By downloading or using any of these files, you are agreeing to be bound by and comply with the license agreement.

---
Copyright (C) 2012-2020, Tealium Inc.
Copyright (C) 2012-2022, Tealium Inc.
17 changes: 10 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdkVersion 33
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.tealium.demo"
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -19,14 +18,18 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

buildFeatures {
viewBinding true
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.tealium:kotlin-remotecommand-dispatcher:1.0.0"
implementation "com.tealium:kotlin-tagmanagement-dispatcher:1.0.0"
implementation "com.tealium:kotlin-lifecycle:1.0.0"
implementation "com.tealium:kotlin-remotecommand-dispatcher:1.1.1"
implementation "com.tealium:kotlin-tagmanagement-dispatcher:1.1.2"
implementation "com.tealium:kotlin-lifecycle:1.1.1"
releaseImplementation "com.tealium.remotecommands:appsflyer:$tealium_appsflyer_version"
debugImplementation project (path: ':appsflyer')

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name">
android:label="@string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
26 changes: 16 additions & 10 deletions app/src/main/java/com/tealium/demo/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,32 @@ package com.tealium.demo

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_main.*
import com.tealium.demo.databinding.ActivityMainBinding
import com.tealium.remotecommands.appsflyer.Host
import org.json.JSONArray

class MainActivity : AppCompatActivity() {

lateinit var binding: ActivityMainBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
binding = ActivityMainBinding.inflate(layoutInflater)
val view = binding.root
setContentView(view)

TealiumHelper.trackView("main_screen")
TealiumHelper.trackEvent("home_screen", mapOf("af_dev_key" to "Y5WQPfwiANqCdVbZSEvpkX"))
TealiumHelper.trackEvent("home_screen", mapOf("af_dev_key" to "<your_key_here>"))


button_setHost.setOnClickListener {
binding.buttonSetHost.setOnClickListener {
TealiumHelper.trackEvent(
"set_host",
mapOf(Host.HOST to "abc123", Host.HOST_PREFIX to "test_prefix")
)
}

button_setUserEmails.setOnClickListener {
binding.buttonSetUserEmails.setOnClickListener {
val emails = JSONArray()
emails.put("[email protected]")
emails.put("[email protected]")
Expand All @@ -31,23 +37,23 @@ class MainActivity : AppCompatActivity() {
)
}

button_setCurrencyCode.setOnClickListener {
binding.buttonSetCurrencyCode.setOnClickListener {
TealiumHelper.trackEvent("set_currency", mapOf("currency_type" to "USD"))
}

button_logPurchase.setOnClickListener {
binding.buttonLogPurchase.setOnClickListener {
TealiumHelper.trackEvent("purchase")
}

button_trackLevelAchieved.setOnClickListener {
binding.buttonTrackLevelAchieved.setOnClickListener {
TealiumHelper.trackEvent("level_up", mapOf("current_level" to 3))
}

button_trackLocation.setOnClickListener {
binding.buttonTrackLocation.setOnClickListener {
TealiumHelper.trackEvent("track_location", mapOf("latitude" to 0.0, "longitude" to 0.0))
}

button_checkStandardEvents.setOnClickListener {
binding.buttonCheckStandardEvents.setOnClickListener {
TealiumHelper.trackEvent("payment", mapOf("payment" to true))
TealiumHelper.trackEvent("cart_add", mapOf())
TealiumHelper.trackEvent("wishlist_add", mapOf())
Expand Down
12 changes: 6 additions & 6 deletions appsflyer/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'maven-publish'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdkVersion 33
buildToolsVersion "30.0.3"


defaultConfig {
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 33
versionCode 1
versionName tealium_appsflyer_version
buildConfigField 'String', 'TAG', "\"Tealium-AppsFlyer-$tealium_appsflyer_version\""
buildConfigField 'String', "TEALIUM_APPSFLYER_VERSION", "\"$tealium_appsflyer_version\""

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
Expand All @@ -33,8 +33,8 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
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:6.5.3'
api 'com.tealium:remotecommands:1.0.1'
implementation "com.appsflyer:af-android-sdk:$appsflyer_version"
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 @@ -15,7 +15,7 @@ open class AppsFlyerRemoteCommand(
private val appsFlyerDevKey: String? = null,
commandId: String = DEFAULT_COMMAND_ID,
description: String = DEFAULT_COMMAND_DESCRIPTION
) : RemoteCommand(commandId, description) {
) : RemoteCommand(commandId, description, BuildConfig.TEALIUM_APPSFLYER_VERSION) {

private val TAG = this::class.java.simpleName

Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.4.10'
ext.kotlin_version = '1.5.30'
ext.mockk_version = '1.9'
ext.tealium_appsflyer_version = '1.2.0'
ext.tealium_appsflyer_version = '1.2.1'
ext.appsflyer_version = "[6.5,7)"

repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
Expand All @@ -21,7 +21,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()

maven {
url "https://maven.tealiumiq.com/android/releases/"
Expand Down

0 comments on commit db1917b

Please sign in to comment.