Skip to content

Commit

Permalink
Merge pull request #194 from Countly/remove-device-id-from-certain-reqs
Browse files Browse the repository at this point in the history
Removed immature addition of 'device_id' param to calls going to request queue
  • Loading branch information
ArtursKadikis authored Nov 2, 2023
2 parents 28000b2 + bf2f3ad commit 8967b94
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 23.8.4
* Mitigated an issue where the device ID was changed after exiting an AB experiment

## 23.8.3
* Added a config method to set a time limit after which the requests would be removed if not sent to the server: 'setRequestDropAgeHours'
* Added a call to enroll users to A/B tests when getting a remote config value: 'getValueAndEnroll'
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout/activity_example_remote_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,11 @@
android:onClick="onClickRemoteConfigPrintValuesAndEnroll"
android:text="Get all and enroll"
/>
<Button
android:id="@+id/exit_all"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="onClickRemoteConfigExitForKeys"
android:text="Exit all keys"
/>
</LinearLayout>
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=true
# RELEASE FIELD SECTION
VERSION_NAME=23.8.3
VERSION_NAME=23.8.4
GROUP=ly.count.android
POM_URL=https://github.com/Countly/countly-sdk-android
POM_SCM_URL=https://github.com/Countly/countly-sdk-android
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public void testPrepareCommonRequest() {
break;
case "sdk_version":
if (a == 0) {
Assert.assertTrue(pair[1].equals("23.8.3"));
Assert.assertTrue(pair[1].equals("23.8.4"));
} else if (a == 1) {
Assert.assertTrue(pair[1].equals("123sdf.v-213"));
}
Expand Down
4 changes: 1 addition & 3 deletions sdk/src/main/java/ly/count/android/sdk/ConnectionQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ public void enrollToKeys(@NonNull String[] keys) {
String data = prepareCommonRequestDataShort()
+ "&method=ab"
+ "&keys=" + UtilsNetworking.encodedArrayBuilder(keys)
+ "&device_id=" + UtilsNetworking.urlEncodeString(deviceIdProvider_.getDeviceId())
+ "&new_end_point=/o/sdk";

addRequestToQueue(data, false);
Expand All @@ -236,8 +235,7 @@ public void exitForKeys(@NonNull String[] keys) {
}

String data = prepareCommonRequestDataShort()
+ "&method=ab_opt_out"
+ "&device_id=" + UtilsNetworking.urlEncodeString(deviceIdProvider_.getDeviceId());
+ "&method=ab_opt_out";

if (keys.length > 0) { // exits all otherwise
data += "&keys=" + UtilsNetworking.encodedArrayBuilder(keys);
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/ly/count/android/sdk/Countly.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ of this software and associated documentation files (the "Software"), to deal
*/
public class Countly {

private final String DEFAULT_COUNTLY_SDK_VERSION_STRING = "23.8.3";
private final String DEFAULT_COUNTLY_SDK_VERSION_STRING = "23.8.4";

/**
* Used as request meta data on every request
Expand Down

0 comments on commit 8967b94

Please sign in to comment.