Skip to content

Commit

Permalink
Merge pull request #519 from adjust/v4287
Browse files Browse the repository at this point in the history
Version 4.28.7
  • Loading branch information
shashanksu authored Nov 15, 2021
2 parents b57fec0 + 82d9d73 commit 472529f
Show file tree
Hide file tree
Showing 31 changed files with 107 additions and 42 deletions.
2 changes: 1 addition & 1 deletion Adjust/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ext {
coreMinSdkVersion = 9
coreCompileSdkVersion = 31
coreTargetSdkVersion = 31
coreVersionName = '4.28.6'
coreVersionName = '4.28.7'
defaultVersionCode = 1
webbridgeMinSdkVersion = 17

Expand Down
5 changes: 5 additions & 0 deletions Adjust/example-app-fbpixel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}

dependencies {
Expand Down
4 changes: 4 additions & 0 deletions Adjust/example-app-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}

dependencies {
Expand Down
4 changes: 4 additions & 0 deletions Adjust/example-app-keyboard/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}

dependencies {
Expand Down
4 changes: 4 additions & 0 deletions Adjust/example-app-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ android {
}
}

compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}

dependencies {
Expand Down
4 changes: 4 additions & 0 deletions Adjust/example-app-tv/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}

dependencies {
Expand Down
4 changes: 4 additions & 0 deletions Adjust/example-app-webbridge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private Adjust() {
*/
public static synchronized AdjustInstance getDefaultInstance() {
@SuppressWarnings("unused")
String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:4.28.6";
String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:4.28.7";

if (defaultInstance == null) {
defaultInstance = new AdjustInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ public void setUrlStrategy(String urlStrategy) {
}
if (!urlStrategy.equals(URL_STRATEGY_INDIA)
&& !urlStrategy.equals(URL_STRATEGY_CHINA)
&& !urlStrategy.equals(DATA_RESIDENCY_EU))
&& !urlStrategy.equals(DATA_RESIDENCY_EU)
&& !urlStrategy.equals(DATA_RESIDENCY_TR)
&& !urlStrategy.equals(DATA_RESIDENCY_US))
{
logger.warn("Unrecognised url strategy %s", urlStrategy);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface Constants {

String SCHEME = "https";
String AUTHORITY = "app.adjust.com";
String CLIENT_SDK = "android4.28.6";
String CLIENT_SDK = "android4.28.7";
String LOGTAG = "Adjust";
String REFTAG = "reftag";
String INSTALL_REFERRER = "install_referrer";
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-plugin-criteo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:4.28.6'
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
}

task adjustCriteoAndroidAar (type: Copy) {
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-plugin-imei/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:4.28.6'
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
}

task adjustImeiAndroidAar (type: Copy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
import java.util.Map;

class TelephonyIdsUtil {
private static String imei = null;
private static String meid = null;
private static String deviceId = null;
private static String imeis = null;
private static String meids = null;
private static String deviceIds = null;

static void injectImei(Map<String, String> parameters, Context context, ILogger logger) {
if (!AdjustImei.isImeiToBeRead) {
return;
Expand All @@ -28,20 +35,30 @@ static void injectImei(Map<String, String> parameters, Context context, ILogger
}

private static String getDeviceIds(TelephonyManager telephonyManager, ILogger logger) {
if (deviceIds != null) {
return deviceIds;
}

List<String> telephonyIdList = new ArrayList<String>();
for (int i = 0; i < 10; i++) {
String telephonyId = getDeviceIdByIndex(telephonyManager, i, logger);
if (!tryAddToStringList(telephonyIdList, telephonyId)) {
break;
}
}
return TextUtils.join(",", telephonyIdList);
deviceIds = TextUtils.join(",", telephonyIdList);
return deviceIds;
}

// Test difference mentioned here https://stackoverflow.com/a/35343531
private static String getDefaultDeviceId(TelephonyManager telephonyManager, ILogger logger) {
if (deviceId != null) {
return deviceId;
}

try {
return telephonyManager.getDeviceId();
deviceId = telephonyManager.getDeviceId();
return deviceId;
} catch (SecurityException e) {
logger.debug("Couldn't read default Device Id: %s", e.getMessage());
}
Expand All @@ -60,20 +77,30 @@ private static String getDeviceIdByIndex(TelephonyManager telephonyManager, int
}

private static String getImeis(TelephonyManager telephonyManager, ILogger logger) {
if (imeis != null) {
return imeis;
}

List<String> imeiList = new ArrayList<String>();
for (int i = 0; i < 10; i++) {
String imei = getImeiByIndex(telephonyManager, i, logger);
if (!tryAddToStringList(imeiList, imei)) {
break;
}
}
return TextUtils.join(",", imeiList);
imeis = TextUtils.join(",", imeiList);
return imeis;
}

private static String getDefaultImei(TelephonyManager telephonyManager, ILogger logger) {
if (imei != null) {
return imei;
}

try {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
return telephonyManager.getImei();
imei = telephonyManager.getImei();
return imei;
}
} catch (SecurityException e) {
logger.debug("Couldn't read default IMEI: %s", e.getMessage());
Expand All @@ -93,20 +120,30 @@ private static String getImeiByIndex(TelephonyManager telephonyManager, int inde
}

public static String getMeids(TelephonyManager telephonyManager, ILogger logger) {
if (meids != null) {
return meids;
}

List<String> meidList = new ArrayList<String>();
for (int i = 0; i < 10; i++) {
String meid = getMeidByIndex(telephonyManager, i, logger);
if (!tryAddToStringList(meidList, meid)) {
break;
}
}
return TextUtils.join(",", meidList);
meids = TextUtils.join(",", meidList);
return meids;
}

private static String getDefaultMeid(TelephonyManager telephonyManager, ILogger logger) {
if (meid != null) {
return meid;
}

try {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
return telephonyManager.getMeid();
meid = telephonyManager.getMeid();
return meid;
}
} catch (SecurityException e) {
logger.debug("Couldn't read default MEID: %s", e.getMessage());
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-plugin-oaid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:4.28.6'
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
}

task adjustOaidAndroidAar (type: Copy) {
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-plugin-sociomantic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:4.28.6'
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
}

task adjustSociomanticAndroidAar (type: Copy) {
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-plugin-trademob/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:4.28.6'
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
}

task adjustTrademobAndroidAar (type: Copy) {
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-plugin-webbridge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:4.28.6'
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
}

task adjustWebBridgeAndroidAar (type: Copy) {
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ var Adjust = {
if (this.adjustConfig) {
return this.adjustConfig.getSdkPrefix();
} else {
return 'web-bridge4.28.6';
return 'web-bridge4.28.7';
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public TestActivityPackage(ActivityPackage activityPackage) {
// default values
appToken = "123456789012";
environment = "sandbox";
clientSdk = "android4.28.6";
clientSdk = "android4.28.7";
suffix = "";
attribution = new AdjustAttribution();
playServices = true;
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### Version 4.28.7 (15th November 2021)
#### Changed
- Added caching of IDs in the IMEI plugin to avoid frequent reads.

---

### Version 4.28.6 (19th October 2021)
#### Added
- Added Huawei Install Referrer Track ID support.
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Read this in other languages: [English][en-readme], [中文][zh-readme], [日本
* [Track event](#et-tracking)
* [Track revenue](#et-revenue)
* [Revenue deduplication](#et-revenue-deduplication)
* [In-app purchase verification](#et-purchase-verification)

### Custom parameters

Expand Down Expand Up @@ -113,14 +112,14 @@ These are the minimum required steps to integrate the Adjust SDK in your Android
If you are using Maven, add the following to your `build.gradle` file:

```gradle
implementation 'com.adjust.sdk:adjust-android:4.28.6'
implementation 'com.adjust.sdk:adjust-android:4.28.7'
implementation 'com.android.installreferrer:installreferrer:2.2'
```

If you would prefer to use the Adjust SDK inside web views in your app, please include this additional dependency as well:

```gradle
implementation 'com.adjust.sdk:adjust-android-webbridge:4.28.6'
implementation 'com.adjust.sdk:adjust-android-webbridge:4.28.7'
```

**Note**: The minimum supported Android API level for the web view extension is 17 (Jelly Bean).
Expand Down Expand Up @@ -897,10 +896,6 @@ Adjust.trackEvent(event);
</tr>
</table>

### <a id="et-purchase-verification"></a>In-app purchase verification

It's possible to verify the in-app Purchases made in your app using [Adjust's Purchase Verification][android-purchase-verification], a server side receipt verification tool. Click the link to find out more.

## Custom parameters

### <a id="cp"></a>Custom parameters overview
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.28.6
4.28.7
4 changes: 2 additions & 2 deletions doc/chinese/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@
如果您使用的是 Maven,请添加下行到您的 `build.gradle` 文件:

```gradle
implementation 'com.adjust.sdk:adjust-android:4.28.6'
implementation 'com.adjust.sdk:adjust-android:4.28.7'
implementation 'com.android.installreferrer:installreferrer:2.2'
```

如果您想在应用 web view 中使用 Adjust SDK,请也添加下列附加依赖项:

```gradle
implementation 'com.adjust.sdk:adjust-android-webbridge:4.28.6'
implementation 'com.adjust.sdk:adjust-android-webbridge:4.28.7'
```

**请注意:** web view 扩展支持的最低安卓 API 级别为 17 (Jelly Bean)。
Expand Down
4 changes: 2 additions & 2 deletions doc/chinese/plugins/oaid.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ OAID 是由移动安全联盟 (MSA) 推出的广告 ID。所有中国国内的
如果您使用的是 Maven,请将以下 OAID 插件依赖项添加到现有 Adjust SDK 依赖项旁的 `build.gradle` 文件:

```
implementation 'com.adjust.sdk:adjust-android:4.28.6'
implementation 'com.adjust.sdk:adjust-android-oaid:4.28.6'
implementation 'com.adjust.sdk:adjust-android:4.28.7'
implementation 'com.adjust.sdk:adjust-android-oaid:4.28.7'
```

您还可以将 Adjust OAID 插件作为 JAR 文件进行添加,该文件可从我们的 [版本页面][releases] 下载。
Expand Down
2 changes: 1 addition & 1 deletion doc/english/migration/migrate.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Migrate your Adjust SDK for Android to 4.28.6 from 3.6.2
## Migrate your Adjust SDK for Android to 4.28.7 from 3.6.2

### The Application class

Expand Down
4 changes: 2 additions & 2 deletions doc/english/plugins/oaid.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ To enable the Adjust SDK to collect and track OAID, follow these steps. To only
If you are using Maven, add the following OAID plugin dependency to your `build.gradle` file next to the existing Adjust SDK dependency:

```
implementation 'com.adjust.sdk:adjust-android:4.28.6'
implementation 'com.adjust.sdk:adjust-android-oaid:4.28.6'
implementation 'com.adjust.sdk:adjust-android:4.28.7'
implementation 'com.adjust.sdk:adjust-android-oaid:4.28.7'
```

You can also add the Adjust OAID plugin as JAR file, which you can download from our [releases page][releases].
Expand Down
Loading

0 comments on commit 472529f

Please sign in to comment.