Skip to content

Commit

Permalink
Release 1.6.23
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzhzh committed Nov 7, 2016
1 parent 21057a8 commit 5302a73
Show file tree
Hide file tree
Showing 4 changed files with 202 additions and 13 deletions.
2 changes: 1 addition & 1 deletion SensorsAnalyticsSDK/SensorsAnalyticsSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

version = "1.6.22"
version = "1.6.23"

android {
compileSdkVersion 21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,17 @@ public void sendData() {
Log.i(LOGTAG, "Invalid data: " + e.getMessage());
}
} catch (ResponseErrorException e) {
Log.i(LOGTAG, "ResponseErrorException: " + e.getMessage());
if (SensorsDataAPI.sharedInstance(mContext).isDebugMode()) {
throw new DebugModeException(e.getMessage());
} else {
Log.i(LOGTAG, "ResponseErrorException: " + e.getMessage());
}
} catch (Exception e) {
Log.i(LOGTAG, "Exception: " + e.getMessage());
if (SensorsDataAPI.sharedInstance(mContext).isDebugMode()) {
throw new DebugModeException(e.getMessage());
} else {
Log.i(LOGTAG, "Exception: " + e.getMessage());
}
} finally {
if (null != bout)
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sensorsdata.analytics.android.sdk;

import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import android.webkit.JavascriptInterface;

Expand All @@ -27,7 +28,12 @@ public String sensorsdata_call_app() {
properties = new JSONObject();
}
properties.put("type", "Android");
properties.put("distinct_id", SensorsDataAPI.sharedInstance(mContext).getDistinctId());
String loginId = SensorsDataAPI.sharedInstance(mContext).getLoginId();
if (!TextUtils.isEmpty(loginId)) {
properties.put("distinct_id", loginId);
} else {
properties.put("distinct_id", SensorsDataAPI.sharedInstance(mContext).getAnonymousId());
}
return properties.toString();
} catch (JSONException e) {
Log.i(LOGTAG, e.getMessage());
Expand Down
Loading

0 comments on commit 5302a73

Please sign in to comment.