Skip to content

Commit

Permalink
Merge pull request #321 from adjust/v4124
Browse files Browse the repository at this point in the history
Version 4.12.4
  • Loading branch information
nonelse authored Mar 9, 2018
2 parents 7ea52e0 + 3b89dce commit 369b803
Show file tree
Hide file tree
Showing 19 changed files with 78 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Adjust/adjust/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'

def getVersionName() {
return "4.12.3"
return "4.12.4"
}

android {
Expand Down
2 changes: 1 addition & 1 deletion Adjust/adjust/src/main/java/com/adjust/sdk/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface Constants {
String BASE_URL = "https://app.adjust.com";
String SCHEME = "https";
String AUTHORITY = "app.adjust.com";
String CLIENT_SDK = "android4.12.3";
String CLIENT_SDK = "android4.12.4";
String LOGTAG = "Adjust";
String REFTAG = "reftag";
String INSTALL_REFERRER = "install_referrer";
Expand Down
14 changes: 12 additions & 2 deletions Adjust/adjust/src/main/java/com/adjust/sdk/EventResponseData.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.adjust.sdk;

import org.json.JSONObject;

/**
* Created by pfms on 09/02/16.
*/
Expand All @@ -19,7 +21,11 @@ public AdjustEventSuccess getSuccessResponseData() {
successResponseData.message = message;
successResponseData.timestamp = timestamp;
successResponseData.adid = adid;
successResponseData.jsonResponse = jsonResponse;
if (jsonResponse != null) {
successResponseData.jsonResponse = jsonResponse;
} else {
successResponseData.jsonResponse = new JSONObject();
}
successResponseData.eventToken = eventToken;

return successResponseData;
Expand All @@ -35,7 +41,11 @@ public AdjustEventFailure getFailureResponseData() {
failureResponseData.timestamp = timestamp;
failureResponseData.adid = adid;
failureResponseData.willRetry = willRetry;
failureResponseData.jsonResponse = jsonResponse;
if (jsonResponse != null) {
failureResponseData.jsonResponse = jsonResponse;
} else {
failureResponseData.jsonResponse = new JSONObject();
}
failureResponseData.eventToken = eventToken;

return failureResponseData;
Expand Down
34 changes: 32 additions & 2 deletions Adjust/adjust/src/main/java/com/adjust/sdk/InstallReferrer.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,47 @@ private void startConnection(final Class listenerClass, final Object listenerPro
* {@inheritDoc}
*/
@Override
public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
public Object invoke(final Object proxy, final Method method, Object[] args)
throws Throwable {
if (method == null) {
logger.error("InstallReferrer invoke method null");
return null;
}
String methodName = method.getName();
if (methodName == null) {
logger.error("InstallReferrer invoke method name null");
return null;
}
// Prints the method being invoked
logger.debug("InstallReferrer invoke method name: %s", methodName);
if (args == null) {
logger.warn("InstallReferrer invoke args null");
args = new Object[0];
}
for (Object arg : args) {
logger.debug("InstallReferrer invoke arg: %s", arg);
}

// if the method name equals some method's name then call your method
if (methodName.equals("onInstallReferrerSetupFinished")) {
onInstallReferrerSetupFinishedInt((Integer) args[0]);
if (args.length != 1) {
logger.error("InstallReferrer invoke onInstallReferrerSetupFinished args lenght not 1: %d", args.length);
return null;
}

Object arg = args[0];
if (!(arg instanceof Integer)) {
logger.error("InstallReferrer invoke onInstallReferrerSetupFinished arg not int");
return null;
}

Integer responseCode = (Integer) arg;
if (responseCode == null) {
logger.error("InstallReferrer invoke onInstallReferrerSetupFinished responseCode arg is null");
return null;
}

onInstallReferrerSetupFinishedInt(responseCode);
} else if (methodName.equals("onInstallReferrerServiceDisconnected")) {
logger.debug("InstallReferrer onInstallReferrerServiceDisconnected");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.adjust.sdk;

import org.json.JSONObject;

/**
* Created by pfms on 09/02/16.
*/
Expand All @@ -13,7 +15,11 @@ public AdjustSessionSuccess getSuccessResponseData() {
successResponseData.message = message;
successResponseData.timestamp = timestamp;
successResponseData.adid = adid;
successResponseData.jsonResponse = jsonResponse;
if (jsonResponse != null) {
successResponseData.jsonResponse = jsonResponse;
} else {
successResponseData.jsonResponse = new JSONObject();
}

return successResponseData;
}
Expand All @@ -28,7 +34,11 @@ public AdjustSessionFailure getFailureResponseData() {
failureResponseData.timestamp = timestamp;
failureResponseData.adid = adid;
failureResponseData.willRetry = willRetry;
failureResponseData.jsonResponse = jsonResponse;
if (jsonResponse != null) {
failureResponseData.jsonResponse = jsonResponse;
} else {
failureResponseData.jsonResponse = new JSONObject();
}

return failureResponseData;
}
Expand Down
2 changes: 1 addition & 1 deletion Adjust/example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
// running mvn package
//compile fileTree(dir: '../target', include: ['*.jar'])
// using maven repository
//compile 'com.adjust.sdk:adjust-android:4.12.3'
//compile 'com.adjust.sdk:adjust-android:4.12.4'

debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
Expand Down
2 changes: 1 addition & 1 deletion Adjust/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>adjust-android</artifactId>
<groupId>com.adjust.sdk</groupId>
<version>4.12.3</version>
<version>4.12.4</version>
<packaging>jar</packaging>
<name>Adjust Android SDK</name>
<url>https://github.com/adjust/android_sdk</url>
Expand Down
2 changes: 1 addition & 1 deletion Adjust/pom_criteo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>adjust-android-criteo</artifactId>
<groupId>com.adjust.sdk</groupId>
<version>4.12.3</version>
<version>4.12.4</version>
<packaging>jar</packaging>
<name>Adjust Android SDK</name>
<url>https://github.com/adjust/android_sdk</url>
Expand Down
2 changes: 1 addition & 1 deletion Adjust/pom_sociomantic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>adjust-android-sociomantic</artifactId>
<groupId>com.adjust.sdk</groupId>
<version>4.12.3</version>
<version>4.12.4</version>
<packaging>jar</packaging>
<name>Adjust Android SDK</name>
<url>https://github.com/adjust/android_sdk</url>
Expand Down
2 changes: 1 addition & 1 deletion Adjust/pom_trademob.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>adjust-android-trademob</artifactId>
<groupId>com.adjust.sdk</groupId>
<version>4.12.3</version>
<version>4.12.4</version>
<packaging>jar</packaging>
<name>Adjust Android SDK</name>
<url>https://github.com/adjust/android_sdk</url>
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.12.3";
clientSdk = "android4.12.4";
suffix = "";
attribution = new AdjustAttribution();
playServices = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ private void startTestSession() {
//testLibrary.addTestDirectory("current/sdkInfo");
//testLibrary.addTest("current/appSecret/Test_AppSecret_no_secret");

testLibrary.startTestSession("android4.12.3");
testLibrary.startTestSession("android4.12.4");
}
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### Version 4.12.4 (9th March 2018)
#### Changed
- Added additional null checks into `InstallReferrer` `invoke` method.

---

### Version 4.12.3 (7th March 2018)
#### Fixed
- Fixed random `OutOfMemoryError` occurrences when reading/writing referrers array.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ These are the minimal steps required to integrate the Adjust SDK into your Andro
If you are using Maven, add the following to your `build.gradle` file:

```
compile 'com.adjust.sdk:adjust-android:4.12.3'
compile 'com.adjust.sdk:adjust-android:4.12.4'
compile 'com.android.installreferrer:installreferrer:1.0'
```

**Note**: If you are using `Gradle 3.0.0 or above`, make sure to use the `implementation` keyword instead of `compile` as follows:

```
implementation 'com.adjust.sdk:adjust-android:4.12.3'
implementation 'com.adjust.sdk:adjust-android:4.12.4'
implementation 'com.android.installreferrer:installreferrer:1.0'
```

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.12.3
4.12.4
2 changes: 1 addition & 1 deletion doc/english/criteo_plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Add the dependency of the adjust sdk with the Criteo plugin:

```
compile 'com.adjust.sdk:adjust-android-criteo:4.12.3'
compile 'com.adjust.sdk:adjust-android-criteo:4.12.4'
```

Or integrate adjust with Criteo events by following these steps:
Expand Down
2 changes: 1 addition & 1 deletion doc/english/migrate.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Migrate your adjust SDK for Android to 4.12.3 from 3.6.2
## Migrate your adjust SDK for Android to 4.12.4 from 3.6.2

### The Application class

Expand Down
2 changes: 1 addition & 1 deletion doc/english/sociomantic_plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Add the dependency of the adjust sdk with the Sociomantic plugin:

```
compile 'com.adjust.sdk:adjust-android-sociomantic:4.12.3'
compile 'com.adjust.sdk:adjust-android-sociomantic:4.12.4'
```

Or integrate adjust with Sociomantic events by following these steps:
Expand Down
2 changes: 1 addition & 1 deletion doc/english/trademob_plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Add the dependency of the adjust sdk with the Trademob plugin:

```
compile 'com.adjust.sdk:adjust-android-trademob:4.12.3'
compile 'com.adjust.sdk:adjust-android-trademob:4.12.4'
```

Or integrate adjust with Trademob events by following these steps:
Expand Down

0 comments on commit 369b803

Please sign in to comment.