Skip to content

Commit

Permalink
Updates user agent version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
willrust committed Jun 13, 2014
1 parent 0468147 commit 2eee2b7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion KISSmetricsAPI/src/com/kissmetrics/sdk/ArchiverImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
public class ArchiverImpl implements Archiver {

private static final String CLIENT_TYPE = "mobile_app";
private static final String USER_AGENT = "kissmetrics-android/2.0.4";
private static final String USER_AGENT = "kissmetrics-android/2.0.5";
private static final String IDENTITY_PREF = "KISSmetricsIdentity";
private static final String SETTINGS_FILE = "KISSmetricsSettings";
private static final String INSTALL_UUID_KEY = "installUuid";
Expand Down
2 changes: 1 addition & 1 deletion KISSmetricsAPI/src/com/kissmetrics/sdk/ConnectionImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void sendRecord(final String urlString, final ConnectionDelegate delegate
connection.setUseCaches(false);
connection.setRequestMethod("GET");
connection.setConnectTimeout(CONNECTION_TIMEOUT*1000);
connection.setRequestProperty("User-Agent", "KISSmetrics-Android/2.0.4");
connection.setRequestProperty("User-Agent", "KISSmetrics-Android/2.0.5");
// TODO: Apply any easily obtainable device/OS info to the user agent value

// addressing java.io.EOFException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class ArchiverImplActTest extends ActivityTestCase {
static QueryEncoder queryEncoder;

static String key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
static String userAgent = "kissmetrics-android/2.0.4";
static String userAgent = "kissmetrics-android/2.0.5";
static String clientType = "mobile_app";


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class QueryEncoderTest extends AndroidTestCase {

static String key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
static String clientType = "mobile_app";
static String userAgent = "android+2.0";
static String userAgent = "android+2.0.5";
static String baseUrl = "https://trk.kissmetrics.com";

static String reservedString = "!*'();:@&=+$,/?#[]";
Expand Down Expand Up @@ -169,7 +169,7 @@ public final void test_createEventQueryWithProperties() {

String createdQuery = cut.createEventQuery(event, properties, identity, timestamp);

String expectedQuery = "/e?_k=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&_c=mobile_app&_u=android+2.0&_p=testuser%40example.com";
String expectedQuery = "/e?_k=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&_c=mobile_app&_u=android+2.0.5&_p=testuser%40example.com";

expectedQuery += "&_n=testEvent";
expectedQuery += ("&_d=1&_t=" + String.valueOf(timestamp));
Expand All @@ -192,7 +192,7 @@ public final void test_createPropertiesQuery() {

String createdQuery = cut.createPropertiesQuery(properties, identity, timestamp);

String expectedQuery = "/s?_k=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&_c=mobile_app&_u=android+2.0&_p=testuser%40example.com&_d=1&_t=";
String expectedQuery = "/s?_k=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&_c=mobile_app&_u=android+2.0.5&_p=testuser%40example.com&_d=1&_t=";

expectedQuery = expectedQuery + String.valueOf(timestamp);
expectedQuery = expectedQuery + "&propertyOne=testPropertyOne&propertyTwo=testPropertyTwo";
Expand All @@ -210,7 +210,7 @@ public final void test_createAliasQuery() {

String createdQuery = cut.createAliasQuery(oldIdentity, newIdentity);

String expectedQuery = "/a?_k=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&_c=mobile_app&_u=android+2.0&_p=testolduser%40example.com&_n=testnewuser%40example.com";
String expectedQuery = "/a?_k=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&_c=mobile_app&_u=android+2.0.5&_p=testolduser%40example.com&_n=testnewuser%40example.com";

assertEquals("URL incorrect", expectedQuery, createdQuery);
}
Expand Down
Binary file modified KISSmetricsSDK.jar
Binary file not shown.

0 comments on commit 2eee2b7

Please sign in to comment.