diff --git a/TrackierSDK/example-app-kotlin/app/src/main/java/com/trackier/example_app_kotlin/MainActivity.kt b/TrackierSDK/example-app-kotlin/app/src/main/java/com/trackier/example_app_kotlin/MainActivity.kt index be57d4a..aef03d7 100644 --- a/TrackierSDK/example-app-kotlin/app/src/main/java/com/trackier/example_app_kotlin/MainActivity.kt +++ b/TrackierSDK/example-app-kotlin/app/src/main/java/com/trackier/example_app_kotlin/MainActivity.kt @@ -59,7 +59,7 @@ class MainActivity : AppCompatActivity(){ } } - requestPermission() + //requestPermission() } private fun getUri(): Uri? { diff --git a/TrackierSDK/example-app-kotlin/app/src/main/java/com/trackier/example_app_kotlin/MainApplication.kt b/TrackierSDK/example-app-kotlin/app/src/main/java/com/trackier/example_app_kotlin/MainApplication.kt index 86aa429..b7e88ca 100644 --- a/TrackierSDK/example-app-kotlin/app/src/main/java/com/trackier/example_app_kotlin/MainApplication.kt +++ b/TrackierSDK/example-app-kotlin/app/src/main/java/com/trackier/example_app_kotlin/MainApplication.kt @@ -38,8 +38,13 @@ class MainApplication : Application() { val sdkConfig = TrackierSDKConfig(this, TR_DEV_KEY, "development") val apkAttributes = AttributionParams("kFyW2bEizc", subSiteID= "sub_partner_tiktok", siteId = "google") sdkConfig.setAttributionParams(apkAttributes) - sdkConfig.setManualMode(true) - TrackierSDK.setLocalRefTrack(true,"_") +// sdkConfig.setManualMode(true) +// TrackierSDK.setLocalRefTrack(true,"_") + TrackierSDK.setUserId("pppppp") + TrackierSDK.setUserEmail("abc@gmail.com") + val userAdditionalDetails: MutableMap = mutableMapOf() + userAdditionalDetails.put("userMobile",9999000000) + TrackierSDK.setUserAdditionalDetails(userAdditionalDetails) TrackierSDK.initialize(sdkConfig) } } diff --git a/TrackierSDK/gradle.properties b/TrackierSDK/gradle.properties index ff434f9..9f6d9b8 100644 --- a/TrackierSDK/gradle.properties +++ b/TrackierSDK/gradle.properties @@ -19,8 +19,8 @@ android.enableJetifier=true POM_DEVELOPER_ID=trackier POM_DEVELOPER_NAME=Trackier POM_LICENCE_DIST=repo -VERSION_CODE=6 -VERSION_NAME=1.6.3 +VERSION_CODE=7 +VERSION_NAME=1.6.4 GROUP=com.trackier POM_SCM_DEV_CONNECTION=scm\:git@github.com\:trackier/android_sdk.git POM_LICENCE_NAME=The Apache Software License, Version 2.0 diff --git a/TrackierSDK/sdk-core/build.gradle b/TrackierSDK/sdk-core/build.gradle index c2fcbe9..5731771 100644 --- a/TrackierSDK/sdk-core/build.gradle +++ b/TrackierSDK/sdk-core/build.gradle @@ -20,8 +20,8 @@ android { defaultConfig { minSdkVersion 16 targetSdkVersion 30 - versionCode 1 - versionName "1.6.0" + versionCode 7 + versionName "1.6.4" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" diff --git a/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/Constants.kt b/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/Constants.kt index 1aa1a95..79704e5 100644 --- a/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/Constants.kt +++ b/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/Constants.kt @@ -1,7 +1,7 @@ package com.trackier.sdk object Constants { - const val SDK_VERSION = "1.6.3" + const val SDK_VERSION = "1.6.4" const val USER_AGENT = "com.cloudstuff.trackiersdk:trackier-android:" + SDK_VERSION const val API_VERSION = "v1" const val BASE_URL = "https://events.trackier.io/" + API_VERSION + "/" diff --git a/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierSDK.kt b/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierSDK.kt index e4463ec..4f9aad2 100644 --- a/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierSDK.kt +++ b/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierSDK.kt @@ -71,4 +71,19 @@ object TrackierSDK { fun fireInstall() { instance.fireInstall() } + + @JvmStatic + fun setUserId(userId: String) { + instance.customerId = userId + } + + @JvmStatic + fun setUserEmail(userEmail: String) { + instance.customerEmail = userEmail + } + + @JvmStatic + fun setUserAdditionalDetails(userAdditionalDetails: MutableMap) { + instance.customerOptionals = userAdditionalDetails + } } diff --git a/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierSDKInstance.kt b/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierSDKInstance.kt index 93b3dce..0a4ef1d 100644 --- a/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierSDKInstance.kt +++ b/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierSDKInstance.kt @@ -23,6 +23,10 @@ class TrackierSDKInstance { var localRefDelimeter = "" var isManualInstall = false + var customerId = "" + var customerEmail = "" + var customerOptionals: MutableMap? = null + /** * Initialize method should be called to initialize the sdk */ @@ -120,6 +124,9 @@ class TrackierSDKInstance { trackierWorkRequest.gaid = gaid trackierWorkRequest.refDetails = getReferrerDetails() trackierWorkRequest.installID = installId + trackierWorkRequest.customerId = this.customerId + trackierWorkRequest.customerEmail = this.customerEmail + trackierWorkRequest.customerOptionals = this.customerOptionals trackierWorkRequest.attributionParams = this.config.getAttributionParams() trackierWorkRequest.sdtk = this.config.getSDKType() diff --git a/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierWorkRequest.kt b/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierWorkRequest.kt index c0c4053..c7b6351 100644 --- a/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierWorkRequest.kt +++ b/TrackierSDK/sdk-core/src/main/java/com/trackier/sdk/TrackierWorkRequest.kt @@ -18,6 +18,9 @@ class TrackierWorkRequest(val kind: String, private val appToken: String, privat var sessionTime = "" var sdtk = "" var attributionParams: AttributionParams? = null + var customerId = "" + var customerEmail = "" + var customerOptionals: MutableMap? = null private fun setDefaults(): MutableMap { val body = mutableMapOf() @@ -34,6 +37,11 @@ class TrackierWorkRequest(val kind: String, private val appToken: String, privat body["appKey"] = appToken body["mode"] = mode body["sdkt"] = sdtk + body["cuid"] = customerId + body["cmail"] = customerEmail + if (customerOptionals != null) { + body["opts"] = customerOptionals!! + } val adnAttributes = this.attributionParams?.getData() if (adnAttributes != null) {