Skip to content

Commit

Permalink
Merge pull request #170 from adjust/rename_device_ids
Browse files Browse the repository at this point in the history
Rename device ids
  • Loading branch information
nonelse committed Feb 8, 2016
2 parents d76df44 + 4e3279e commit 75e668c
Show file tree
Hide file tree
Showing 19 changed files with 40 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Adjust/adjust/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 9
targetSdkVersion 23
versionCode 1
versionName "4.2.2"
versionName "4.2.3"
}
}

Expand Down
21 changes: 16 additions & 5 deletions Adjust/adjust/src/main/java/com/adjust/sdk/Adjust.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,27 +78,38 @@ public static void setOfflineMode(boolean enabled) {
adjustInstance.setOfflineMode(enabled);
}

public static void getGoogleAdId(Context context, final OnDeviceIdRead onDeviceIdRead) {
public static void getGoogleAdId(Context context, final OnDeviceIdsRead onDeviceIdRead) {
ILogger logger = AdjustFactory.getLogger();
if (Looper.myLooper() != Looper.getMainLooper()) {
onDeviceIdRead.onPlayAdIdRead(Util.getPlayAdId(context));
logger.debug("GoogleAdId being read in the background");
String GoogleAdId = Util.getPlayAdId(context);

logger.debug("GoogleAdId read " + GoogleAdId);
onDeviceIdRead.onGoogleAdIdRead(GoogleAdId);
return;
}
try{
logger.debug("GoogleAdId being read in the foreground");

new AsyncTask<Context,Void,String>() {
@Override
protected String doInBackground(Context... params) {
ILogger logger = AdjustFactory.getLogger();
Context innerContext = params[0];
String innerResult = Util.getPlayAdId(innerContext);
logger.debug("GoogleAdId read " + innerResult);
return innerResult;
}

@Override
protected void onPostExecute(String playAdiId) {
onDeviceIdRead.onPlayAdIdRead(playAdiId);
super.onPostExecute(playAdiId);
ILogger logger = AdjustFactory.getLogger();
onDeviceIdRead.onGoogleAdIdRead(playAdiId);
}
}.execute(context);
} catch (Exception e) {}
} catch (Exception e) {
logger.error("Unable to get GoogleAdId from the foreground (%s)", e.getMessage());
}
}
}

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 @@ -27,7 +27,7 @@ public interface Constants {
String BASE_URL = "https://app.adjust.com";
String SCHEME = "https";
String AUTHORITY = "app.adjust.com";
String CLIENT_SDK = "android4.2.2";
String CLIENT_SDK = "android4.2.3";
String LOGTAG = "Adjust";
String REFTAG = "reftag";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.adjust.sdk;

public interface OnAttributionChangedListener {
public void onAttributionChanged(AdjustAttribution attribution);
void onAttributionChanged(AdjustAttribution attribution);
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.adjust.sdk;

/**
* Created by pfms on 29/01/16.
*/
public interface OnDeviceIdsRead {
void onGoogleAdIdRead(String playAdId);
}
2 changes: 1 addition & 1 deletion Adjust/example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ dependencies {
// running mvn package
//compile fileTree(dir: '../target', include: ['*.jar'])
// using maven repository
//compile 'com.adjust.sdk:adjust-android:4.2.2'
//compile 'com.adjust.sdk:adjust-android:4.2.3'
}
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ else if (product instanceof Map) {
}
}

if (!po.isEmpty()) {
if (!productList.isEmpty()) {
po.put(SCMProducts, productList);
addPartnerParameter(event, "socio_po", stringify(po));
}
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.2.2</version>
<version>4.2.3</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.2.2</version>
<version>4.2.3</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.2.2</version>
<version>4.2.3</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.2.2</version>
<version>4.2.3</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 @@ -49,7 +49,7 @@ public TestActivityPackage(ActivityPackage activityPackage) {
// default values
appToken = "123456789012";
environment = "sandbox";
clientSdk = "android4.2.2";
clientSdk = "android4.2.3";
suffix = "";
attribution = new AdjustAttribution();
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ compile project(":adjust")
If you are using Maven, add this line instead:

```
compile 'com.adjust.sdk:adjust-android:4.2.2'
compile 'com.adjust.sdk:adjust-android:4.2.3'
```

### 4. Add Google Play Services
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.2
4.2.3
2 changes: 1 addition & 1 deletion doc/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.2.2'
compile 'com.adjust.sdk:adjust-android-criteo:4.2.3'
```

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

### The Application class

Expand Down
2 changes: 1 addition & 1 deletion doc/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.2.2'
compile 'com.adjust.sdk:adjust-android-sociomantic:4.2.3'
```

Or integrate adjust with Sociomantic events by following these steps:
Expand Down
2 changes: 1 addition & 1 deletion doc/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.2.2'
compile 'com.adjust.sdk:adjust-android-trademob:4.2.3'
```

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

0 comments on commit 75e668c

Please sign in to comment.