diff --git a/Adjust/build.gradle b/Adjust/build.gradle index 5f1a78c87..2a5825ac0 100644 --- a/Adjust/build.gradle +++ b/Adjust/build.gradle @@ -9,11 +9,12 @@ ext { coreMinSdkVersion = 9 coreCompileSdkVersion = 34 coreTargetSdkVersion = 34 - coreVersionName = '4.38.2' + coreVersionName = '4.38.3' defaultVersionCode = 1 webbridgeMinSdkVersion = 17 samsungReferrerMinSdkVersion = 18 vivoReferrerMinSdkVersion = 23 + samsungCloudDevMinSdkVersion = 23 // POM. adjustGroupId = 'com.adjust.sdk' diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java index beb22e45a..ece03b3f3 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java @@ -34,7 +34,7 @@ private Adjust() { */ public static synchronized AdjustInstance getDefaultInstance() { @SuppressWarnings("unused") - String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:4.38.2"; + String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:4.38.3"; if (defaultInstance == null) { defaultInstance = new AdjustInstance(); diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/Constants.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/Constants.java index 1d486c0bc..5517ad09a 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/Constants.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/Constants.java @@ -30,7 +30,7 @@ public interface Constants { String SCHEME = "https"; String AUTHORITY = "app.adjust.com"; - String CLIENT_SDK = "android4.38.2"; + String CLIENT_SDK = "android4.38.3"; String LOGTAG = "Adjust"; String REFTAG = "reftag"; String INSTALL_REFERRER = "install_referrer"; diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/DeviceInfo.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/DeviceInfo.java index 9de4f54d4..3f939a42d 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/DeviceInfo.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/DeviceInfo.java @@ -92,6 +92,7 @@ class DeviceInfo { int uiMode; String appSetId; boolean isGooglePlayGamesForPC; + Boolean isSamsungCloudEnvironment; Map imeiParameters; Map oaidParameters; @@ -134,12 +135,21 @@ class DeviceInfo { appInstallTime = getAppInstallTime(packageInfo); appUpdateTime = getAppUpdateTime(packageInfo); uiMode = getDeviceUiMode(configuration); + if (Reflection.isAppRunningInSamsungCloudEnvironment(context, adjustConfig.logger)) { + isSamsungCloudEnvironment = true; + playAdId = Reflection.getSamsungCloudDevGoogleAdId(context, adjustConfig.logger); + playAdIdSource = "samsung_cloud_sdk"; + } if (Util.canReadPlayIds(adjustConfig)) { appSetId = Reflection.getAppSetId(context); } } void reloadPlayIds(final AdjustConfig adjustConfig) { + if (isSamsungCloudEnvironment != null && isSamsungCloudEnvironment) { + return; + } + if (!Util.canReadPlayIds(adjustConfig)) { return; } diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/Reflection.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/Reflection.java index 9e198cb95..57a388e87 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/Reflection.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/Reflection.java @@ -123,6 +123,32 @@ public static String getAppSetId(Context context) { } } + public static String getSamsungCloudDevGoogleAdId(Context context, ILogger logger) { + String googleAdId = null; + try { + googleAdId = (String) invokeStaticMethod("com.adjust.sdk.samsung.clouddev.Util", + "getGoogleAdId", + new Class[]{Context.class, ILogger.class}, + context, logger); + } catch (Exception e) { + logger.info("invoke getGoogleAdId : " + e.getMessage()); + } + return googleAdId; + } + + public static boolean isAppRunningInSamsungCloudEnvironment(Context context, ILogger logger) { + boolean isCloudEnvironment = false; + try { + isCloudEnvironment = (boolean) invokeStaticMethod("com.adjust.sdk.samsung.clouddev.Util", + "isAppRunningInCloudEnvironment", + new Class[]{Context.class, ILogger.class}, + context, logger); + } catch (Exception e) { + logger.info("invoke isAppRunningInCloudEnvironment : " + e.getMessage()); + } + return isCloudEnvironment; + } + public static Class forName(String className) { try { Class classObject = Class.forName(className); diff --git a/Adjust/sdk-plugin-criteo/build.gradle b/Adjust/sdk-plugin-criteo/build.gradle index 82e93f106..351b74d6a 100644 --- a/Adjust/sdk-plugin-criteo/build.gradle +++ b/Adjust/sdk-plugin-criteo/build.gradle @@ -30,7 +30,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.2' + // implementation 'com.adjust.sdk:adjust-android:4.38.3' } // read local properties diff --git a/Adjust/sdk-plugin-imei/build.gradle b/Adjust/sdk-plugin-imei/build.gradle index eb772d7d7..f8c7f62bd 100644 --- a/Adjust/sdk-plugin-imei/build.gradle +++ b/Adjust/sdk-plugin-imei/build.gradle @@ -30,7 +30,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.2' + // implementation 'com.adjust.sdk:adjust-android:4.38.3' } // read local properties diff --git a/Adjust/sdk-plugin-oaid/build.gradle b/Adjust/sdk-plugin-oaid/build.gradle index 8b97bac9a..345548298 100644 --- a/Adjust/sdk-plugin-oaid/build.gradle +++ b/Adjust/sdk-plugin-oaid/build.gradle @@ -33,7 +33,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.2' + // implementation 'com.adjust.sdk:adjust-android:4.38.3' implementation 'com.huawei.hms:ads-identifier:3.4.56.300' } diff --git a/Adjust/sdk-plugin-samsung-clouddev/.gitignore b/Adjust/sdk-plugin-samsung-clouddev/.gitignore new file mode 100644 index 000000000..97873191d --- /dev/null +++ b/Adjust/sdk-plugin-samsung-clouddev/.gitignore @@ -0,0 +1,2 @@ +/build +/libs diff --git a/Adjust/sdk-plugin-samsung-clouddev/build.gradle b/Adjust/sdk-plugin-samsung-clouddev/build.gradle new file mode 100644 index 000000000..256e62ed4 --- /dev/null +++ b/Adjust/sdk-plugin-samsung-clouddev/build.gradle @@ -0,0 +1,223 @@ +apply plugin: 'com.android.library' +apply plugin: 'maven-publish' +apply plugin: 'signing' + +repositories { + maven { + url "https://oss.sonatype.org/content/repositories/staging/" + } +} + +android { + compileSdkVersion rootProject.ext.coreCompileSdkVersion + publishing { + multipleVariants { + allVariants() + withJavadocJar() + } + } + defaultConfig { + minSdkVersion rootProject.ext.samsungCloudDevMinSdkVersion + targetSdkVersion rootProject.ext.coreTargetSdkVersion + } + namespace 'com.adjust.sdk.samsung.clouddev' +} + +dependencies { + // Add SDK via module. + compileOnly project(':sdk-core') + // Add SDK via Maven. + // implementation 'com.adjust.sdk:adjust-android:4.38.3' + + // Add Samsung clouddev lib. + compileOnly fileTree(include: ['*.aar'], dir: 'libs') +} + +// read local properties +File localPropsFile = project.rootProject.file('local.properties') +if (localPropsFile.exists()) { + Properties p = new Properties() + new FileInputStream(localPropsFile).withCloseable { is -> + p.load(is) + } + p.each { name, value -> + ext[name] = value + } +} + +task adjustSamsungCloudDevPluginAar(type: Copy) { + dependsOn 'assembleRelease' + + from('build/outputs/aar/') + include 'sdk-plugin-samsung-clouddev-release.aar' + destinationDir file('build/libs/') + rename 'sdk-plugin-samsung-clouddev-release.aar', "${project.name}.aar" + +} + +task adjustSamsungCloudDevPluginJar(type: Jar) { + dependsOn 'packageReleaseAssets' + dependsOn 'compileReleaseJavaWithJavac' + + from('build/intermediates/library_assets/release/packageReleaseAssets/out/') { + into('assets') + } + from('build/intermediates/javac/release/classes/') + + archiveFileName = project.provider { "${project.name}.jar" } +} + + +task adjustSamsungCloudDevPluginSourcesJar(type: Jar) { + setArchiveClassifier('sources') + from android.sourceSets.main.java.srcDirs +} + +artifacts { + archives adjustSamsungCloudDevPluginJar + archives adjustSamsungCloudDevPluginSourcesJar +} + +afterEvaluate { + publishing { + publications { +/* + mavenAndroidSamsungCloudDevJar(MavenPublication) { + customizePomForJar(pom) + groupId rootProject.ext.adjustGroupId + artifactId 'adjust-android-samsung-clouddev' + version rootProject.ext.coreVersionName + + artifact adjustSamsungCloudDevPluginJar + artifact adjustSamsungCloudDevPluginSourcesJar + } +*/ + mavenAndroidSamsungCloudDevAar(MavenPublication) { + customizePomForAar(pom) + groupId rootProject.ext.adjustGroupId + artifactId 'adjust-android-samsung-clouddev' + version rootProject.ext.coreVersionName + + artifact("$buildDir/outputs/aar/sdk-plugin-samsung-clouddev-release.aar") { + builtBy tasks.getByPath("adjustSamsungCloudDevPluginAar") + } + artifact adjustSamsungCloudDevPluginSourcesJar + } + } + + repositories { + maven { + url "https://oss.sonatype.org/service/local/staging/deploy/maven2" + if (project.hasProperty("sonatypeUsername")) { + credentials { + username sonatypeUsername + password sonatypePassword + } + } + } + } + } + signing { +// sign publishing.publications.mavenAndroidSamsungCloudDevJar + sign publishing.publications.mavenAndroidSamsungCloudDevAar + } +} + +def customizePomForJar(pom) { + pom.withXml { + def root = asNode() + + // Add all items necessary for maven central publication. + root.children().last() + { + resolveStrategy = Closure.DELEGATE_FIRST + description 'The Samsung CloudDev plugin for Adjust SDK for Android' + name 'Adjust Android SDK Samsung CloudDev plugin' + url 'https://github.com/adjust/android_sdk' + + organization { + name 'adjust GmbH' + url 'http://www.adjust.com' + } + licenses { + license { + name 'MIT License' + url 'http://www.opensource.org/licenses/mit-license.php' + } + } + scm { + url 'git@github.com:adjust/android_sdk.git' + connection 'scm:git:git@github.com:adjust/android_sdk.git' + developerConnection 'scm:git:git@github.com:adjust/android_sdk.git' + } + developers { + developer { + name 'Pedro Silva' + email 'pedro@adjust.com' + } + developer { + name 'Ugljesa Erceg' + email 'ugljesa@adjust.com' + } + } + } + } +} + +def customizePomForAar(pom) { + pom.withXml { + def root = asNode() + + // Add all items necessary for maven central publication. + root.children().last() + { + resolveStrategy = Closure.DELEGATE_FIRST + description 'The Samsung CloudDev plugin for Adjust SDK for Android' + name 'Adjust Android SDK Samsung CloudDev plugin' + url 'https://github.com/adjust/android_sdk' + + organization { + name 'adjust GmbH' + url 'http://www.adjust.com' + } + licenses { + license { + name 'MIT License' + url 'http://www.opensource.org/licenses/mit-license.php' + } + } + scm { + url 'git@github.com:adjust/android_sdk.git' + connection 'scm:git:git@github.com:adjust/android_sdk.git' + developerConnection 'scm:git:git@github.com:adjust/android_sdk.git' + } + developers { + developer { + name 'Pedro Silva' + email 'pedro@adjust.com' + } + developer { + name 'Ugljesa Erceg' + email 'ugljesa@adjust.com' + } + } + } + } +} + +model { +// tasks.generatePomFileForMavenAndroidSamsungCloudDevJarPublication { +// destination = file("${project.buildDir}/generated-pom.xml") +// } + /* TODO check if/how to replace this tasks + tasks.publishMavenAndroidSamsungCloudDevPublicationToMavenLocal { + dependsOn project.tasks.signArchives + } + tasks.publishMavenAndroidSamsungCloudDevPublicationToMavenRepository { + dependsOn project.tasks.signArchives + } + */ + tasks.generatePomFileForMavenAndroidSamsungCloudDevAarPublication { + destination = file("${project.buildDir}/generated-pom.xml") + } +} + + diff --git a/Adjust/sdk-plugin-samsung-clouddev/proguard-rules.pro b/Adjust/sdk-plugin-samsung-clouddev/proguard-rules.pro new file mode 100644 index 000000000..0c5ad1da8 --- /dev/null +++ b/Adjust/sdk-plugin-samsung-clouddev/proguard-rules.pro @@ -0,0 +1,23 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile + +-keepclassmembers, includecode class com.samsung.android.game.cloudgame.dev.sdk.* { *;} \ No newline at end of file diff --git a/Adjust/sdk-plugin-samsung-clouddev/src/main/AndroidManifest.xml b/Adjust/sdk-plugin-samsung-clouddev/src/main/AndroidManifest.xml new file mode 100644 index 000000000..7ce061b6d --- /dev/null +++ b/Adjust/sdk-plugin-samsung-clouddev/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/Adjust/sdk-plugin-samsung-clouddev/src/main/java/com/adjust/sdk/samsung/clouddev/AdjustSamsungCloudDev.java b/Adjust/sdk-plugin-samsung-clouddev/src/main/java/com/adjust/sdk/samsung/clouddev/AdjustSamsungCloudDev.java new file mode 100644 index 000000000..9090c09d3 --- /dev/null +++ b/Adjust/sdk-plugin-samsung-clouddev/src/main/java/com/adjust/sdk/samsung/clouddev/AdjustSamsungCloudDev.java @@ -0,0 +1,16 @@ +package com.adjust.sdk.samsung.clouddev; + +import android.content.Context; + +public class AdjustSamsungCloudDev { + + static boolean shouldUseSamsungCloudDevSdk = true; + + public static void useSamsungCloudDevSdk(Context context) { + shouldUseSamsungCloudDevSdk = true; + } + + public static void doNotUseSamsungCloudDevSdk() { + shouldUseSamsungCloudDevSdk = false; + } +} diff --git a/Adjust/sdk-plugin-samsung-clouddev/src/main/java/com/adjust/sdk/samsung/clouddev/SamsungCloudDevClient.java b/Adjust/sdk-plugin-samsung-clouddev/src/main/java/com/adjust/sdk/samsung/clouddev/SamsungCloudDevClient.java new file mode 100644 index 000000000..01edd5e1f --- /dev/null +++ b/Adjust/sdk-plugin-samsung-clouddev/src/main/java/com/adjust/sdk/samsung/clouddev/SamsungCloudDevClient.java @@ -0,0 +1,54 @@ +package com.adjust.sdk.samsung.clouddev; + +import android.content.Context; + +import com.adjust.sdk.ILogger; +import com.samsung.android.game.cloudgame.dev.sdk.CloudDevCallback; +import com.samsung.android.game.cloudgame.dev.sdk.CloudDevSdk; + +import java.util.Arrays; +import java.util.Map; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.TimeUnit; + +public class SamsungCloudDevClient { + + public static String getGoogleAdId(Context context, final ILogger logger, long maxWaitTimeInMilli) { + + try { + final BlockingQueue gaidHolder = new LinkedBlockingQueue(1); + + CloudDevSdk.INSTANCE.request(context, Arrays.asList("gaid"), new CloudDevCallback() { + @Override + public void onSuccess(Map kinds) { // This is called in IO thread + String gaid = kinds.get("gaid"); + if (gaid == null) { + gaid = ""; + } + logger.info("Google Advertising ID: " + gaid); + gaidHolder.offer(gaid); + } + @Override + public void onError(String reason) { // This is called in IO thread + logger.error("Error: " + reason); + } }); + + return gaidHolder.poll(maxWaitTimeInMilli, TimeUnit.MILLISECONDS); + + } catch (Throwable t) { + logger.error("Error while getting gps adid from samsung clould sdk: ", t.getMessage()); + } + + return null; + } + + public static boolean isAppRunningInCloudEnvironment(Context context, final ILogger logger) { + try { + return CloudDevSdk.INSTANCE.isCloudEnvironment(context); + } catch (Throwable t) { + logger.error("Error while calling CloudDevSdk isCloudEnvironment: ", t.getMessage()); + } + return false; + } +} diff --git a/Adjust/sdk-plugin-samsung-clouddev/src/main/java/com/adjust/sdk/samsung/clouddev/Util.java b/Adjust/sdk-plugin-samsung-clouddev/src/main/java/com/adjust/sdk/samsung/clouddev/Util.java new file mode 100644 index 000000000..44ea46614 --- /dev/null +++ b/Adjust/sdk-plugin-samsung-clouddev/src/main/java/com/adjust/sdk/samsung/clouddev/Util.java @@ -0,0 +1,23 @@ +package com.adjust.sdk.samsung.clouddev; + +import android.content.Context; + +import com.adjust.sdk.ILogger; + +public class Util { + public synchronized static String getGoogleAdId(Context context, ILogger logger) { + if (!AdjustSamsungCloudDev.shouldUseSamsungCloudDevSdk) { + return null; + } + + return SamsungCloudDevClient.getGoogleAdId(context, logger, 4000); + } + + public synchronized static boolean isAppRunningInCloudEnvironment(Context context, ILogger logger) { + if (!AdjustSamsungCloudDev.shouldUseSamsungCloudDevSdk) { + return false; + } + + return SamsungCloudDevClient.isAppRunningInCloudEnvironment(context, logger); + } +} diff --git a/Adjust/sdk-plugin-samsung-clouddev/src/main/res/values/strings.xml b/Adjust/sdk-plugin-samsung-clouddev/src/main/res/values/strings.xml new file mode 100644 index 000000000..6b317dc57 --- /dev/null +++ b/Adjust/sdk-plugin-samsung-clouddev/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + AdjustPluginSamsungCloudDev + diff --git a/Adjust/sdk-plugin-samsung-referrer/build.gradle b/Adjust/sdk-plugin-samsung-referrer/build.gradle index c3e3c191b..c0abdb3c7 100644 --- a/Adjust/sdk-plugin-samsung-referrer/build.gradle +++ b/Adjust/sdk-plugin-samsung-referrer/build.gradle @@ -27,7 +27,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.2' + // implementation 'com.adjust.sdk:adjust-android:4.38.3' // Add Samsung referrer lib via Maven. implementation 'store.galaxy.samsung.installreferrer:samsung_galaxystore_install_referrer:3.0.1' diff --git a/Adjust/sdk-plugin-sociomantic/build.gradle b/Adjust/sdk-plugin-sociomantic/build.gradle index bd81bcb46..a0f05aa64 100644 --- a/Adjust/sdk-plugin-sociomantic/build.gradle +++ b/Adjust/sdk-plugin-sociomantic/build.gradle @@ -28,7 +28,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.2' + // implementation 'com.adjust.sdk:adjust-android:4.38.3' } // read local properties diff --git a/Adjust/sdk-plugin-trademob/build.gradle b/Adjust/sdk-plugin-trademob/build.gradle index d090b86bd..8754c7040 100644 --- a/Adjust/sdk-plugin-trademob/build.gradle +++ b/Adjust/sdk-plugin-trademob/build.gradle @@ -28,7 +28,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.2' + // implementation 'com.adjust.sdk:adjust-android:4.38.3' } // read local properties diff --git a/Adjust/sdk-plugin-vivo-referrer/build.gradle b/Adjust/sdk-plugin-vivo-referrer/build.gradle index 8824ef54c..dedc3bd68 100644 --- a/Adjust/sdk-plugin-vivo-referrer/build.gradle +++ b/Adjust/sdk-plugin-vivo-referrer/build.gradle @@ -30,7 +30,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.2' + // implementation 'com.adjust.sdk:adjust-android:4.38.3' } // read local properties diff --git a/Adjust/sdk-plugin-webbridge/build.gradle b/Adjust/sdk-plugin-webbridge/build.gradle index 6129e32bc..4b2d0cf61 100644 --- a/Adjust/sdk-plugin-webbridge/build.gradle +++ b/Adjust/sdk-plugin-webbridge/build.gradle @@ -30,7 +30,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.2' + // implementation 'com.adjust.sdk:adjust-android:4.38.3' } // read local properties diff --git a/Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js b/Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js index 7c327c5b3..51422eb50 100644 --- a/Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js +++ b/Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js @@ -211,7 +211,7 @@ var Adjust = { if (this.adjustConfig) { return this.adjustConfig.getSdkPrefix(); } else { - return 'web-bridge4.38.2'; + return 'web-bridge4.38.3'; } }, diff --git a/Adjust/sdk-plugin-webbridge/src/main/java/com/adjust/sdk/webbridge/AdjustBridgeUtil.java b/Adjust/sdk-plugin-webbridge/src/main/java/com/adjust/sdk/webbridge/AdjustBridgeUtil.java index 0b9b4579a..da9a6a653 100644 --- a/Adjust/sdk-plugin-webbridge/src/main/java/com/adjust/sdk/webbridge/AdjustBridgeUtil.java +++ b/Adjust/sdk-plugin-webbridge/src/main/java/com/adjust/sdk/webbridge/AdjustBridgeUtil.java @@ -281,88 +281,4 @@ public static String[] jsonArrayToArray(JSONArray jsonArray) throws JSONExceptio public static ILogger getLogger() { return AdjustFactory.getLogger(); } - - - static UtilNetworking.IConnectionOptions testConnectionOptions() { - return new UtilNetworking.IConnectionOptions() { - @Override - public void applyConnectionOptions(final HttpsURLConnection connection, - final String clientSdk) - { - UtilNetworking.IConnectionOptions defaultConnectionOption = - UtilNetworking.createDefaultConnectionOptions(); - defaultConnectionOption.applyConnectionOptions(connection, clientSdk); - try { - SSLContext sc = SSLContext.getInstance("TLS"); - sc.init(null, new TrustManager[]{ - new X509TrustManager() { - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - Log.d("TestApp","getAcceptedIssuers"); - return null; - } - public void checkClientTrusted( - X509Certificate[] certs, String authType) { - Log.d("TestApp","checkClientTrusted "); - } - public void checkServerTrusted( - X509Certificate[] certs, String authType) throws CertificateException { - Log.d("TestApp","checkServerTrusted "); - - String serverThumbprint = "7BCFF44099A35BC093BB48C5A6B9A516CDFDA0D1"; - X509Certificate certificate = certs[0]; - - MessageDigest md = null; - try { - md = MessageDigest.getInstance("SHA1"); - byte[] publicKey = md.digest(certificate.getEncoded()); - String hexString = byte2HexFormatted(publicKey); - - if (!hexString.equalsIgnoreCase(serverThumbprint)) { - throw new CertificateException(); - } - } catch (NoSuchAlgorithmException e) { - Log.e("TestApp","testingMode error " + e.getMessage()); - } catch (CertificateEncodingException e) { - Log.e("TestApp","testingMode error " + e.getMessage()); - } - } - } - }, new java.security.SecureRandom()); - connection.setSSLSocketFactory(sc.getSocketFactory()); - - connection.setHostnameVerifier(new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { - Log.d("TestApp","verify hostname "); - return true; - } - }); - } catch (Exception e) { - Log.e("TestApp","testingMode error " + e.getMessage()); - } - } - }; - } - - private static String byte2HexFormatted(byte[] arr) { - StringBuilder str = new StringBuilder(arr.length * 2); - - for (int i = 0; i < arr.length; i++) { - String h = Integer.toHexString(arr[i]); - int l = h.length(); - - if (l == 1) { - h = "0" + h; - } - - if (l > 2) { - h = h.substring(l - 2, l); - } - - str.append(h.toUpperCase()); - - // if (i < (arr.length - 1)) str.append(':'); - } - return str.toString(); - } } diff --git a/Adjust/sdk-plugin-xiaomi-referrer/build.gradle b/Adjust/sdk-plugin-xiaomi-referrer/build.gradle index 733f24285..fbba5b1a4 100644 --- a/Adjust/sdk-plugin-xiaomi-referrer/build.gradle +++ b/Adjust/sdk-plugin-xiaomi-referrer/build.gradle @@ -31,7 +31,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.2' + // implementation 'com.adjust.sdk:adjust-android:4.38.3' // Add xiaomi referrer lib via Maven. implementation 'com.miui.referrer:homereferrer:1.0.0.6' diff --git a/Adjust/settings.gradle b/Adjust/settings.gradle index 88c3974a1..cbec02925 100644 --- a/Adjust/settings.gradle +++ b/Adjust/settings.gradle @@ -1,3 +1,3 @@ -include ':sdk-core', ':sdk-plugin-webbridge', ':sdk-plugin-oaid', ':sdk-plugin-sociomantic', ':sdk-plugin-trademob', ':sdk-plugin-imei', ':sdk-plugin-criteo', ':sdk-plugin-xiaomi-referrer', ':sdk-plugin-samsung-referrer', ':sdk-plugin-vivo-referrer' +include ':sdk-core', ':sdk-plugin-webbridge', ':sdk-plugin-oaid', ':sdk-plugin-sociomantic', ':sdk-plugin-trademob', ':sdk-plugin-imei', ':sdk-plugin-criteo', ':sdk-plugin-xiaomi-referrer', ':sdk-plugin-samsung-referrer', ':sdk-plugin-vivo-referrer', ':sdk-plugin-samsung-clouddev' include ':test-options', ':test-unit', ':test-library', ':test-app-core', ':test-kotlin', ':test-app-webbridge' include ':example-app-java', ':example-app-kotlin', ':example-app-tv', ':example-app-webbridge', ':example-app-fbpixel', ':example-app-keyboard' diff --git a/Adjust/test-unit/src/androidTest/java/com/adjust/sdk/TestActivityPackage.java b/Adjust/test-unit/src/androidTest/java/com/adjust/sdk/TestActivityPackage.java index c102fa8e2..9cd7ebc2c 100644 --- a/Adjust/test-unit/src/androidTest/java/com/adjust/sdk/TestActivityPackage.java +++ b/Adjust/test-unit/src/androidTest/java/com/adjust/sdk/TestActivityPackage.java @@ -53,7 +53,7 @@ public TestActivityPackage(ActivityPackage activityPackage) { // default values appToken = "123456789012"; environment = "sandbox"; - clientSdk = "android4.38.2"; + clientSdk = "android4.38.3"; suffix = ""; attribution = new AdjustAttribution(); playServices = true; diff --git a/CHANGELOG.md b/CHANGELOG.md index 74b057417..a33319458 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +### Version 4.38.3 (26th March 2024) +#### Added +- Added support for Samsung CloudDev SDK to read Google Play Advertising Identifier. + +#### Changed + - Removed webbridge unused code. + +--- + ### Version 4.38.2 (28th February 2024) #### Fixed - Fixed occasional invalid signature cases when SDK package payload would be altered right before sending. diff --git a/VERSION b/VERSION index c1a44ab2b..3ebe3743b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.38.2 +4.38.3