Skip to content

Commit 558798c

Browse files
authored
Merge pull request #70 from optimizely/mng/add-test-app-doc
Add documentation for not persisting userId in teset app for QA purposes
2 parents 5bc91ac + 20f9910 commit 558798c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test-app/src/main/java/com/optimizely/ab/android/test_app/MyApplication.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public String getAnonUserId() {
5656
String id = sharedPreferences.getString("userId", null);
5757
if (id == null) {
5858
id = UUID.randomUUID().toString();
59+
60+
// comment this out to get a brand new user id every time this function is called.
61+
// useful for incrementing results page count for QA purposes
5962
sharedPreferences.edit().putString("userId", id).apply();
6063
}
6164
return id;

0 commit comments

Comments
 (0)