File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
datafile-handler/src/main/java/com/optimizely/ab/android/datafile_handler
test-app/src/main/java/com/optimizely/ab/android/test_app Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,9 @@ List<DatafileConfig> getWatchingDatafileConfigs() {
127127 final String projectKey = iterator .next ();
128128 if (backgroundWatchers .getBoolean (projectKey )) {
129129 DatafileConfig datafileConfig = null ;
130- if (projectKey .contains ("-" )) {
130+ boolean sdkKey = projectKey .matches (".*[A-Za-z].*" );
131+ //TODO: This should be changed to store a jsonized datafile config.
132+ if (sdkKey ) {
131133 datafileConfig = new DatafileConfig (null , projectKey );
132134 }
133135 else {
Original file line number Diff line number Diff line change @@ -71,9 +71,11 @@ public void onCreate() {
7171 // This app is built against a real Optimizely project with real experiments set. Automated
7272 // espresso tests are run against this project id. Changing it will make the Optimizely
7373 // must match the project id of the compiled in Optimizely data file in rest/raw/data_file.json.
74- OptimizelyManager .Builder builder = OptimizelyManager .builder (PROJECT_ID );
74+
75+ OptimizelyManager .Builder builder = OptimizelyManager .builder ();
7576 optimizelyManager = builder .withEventDispatchInterval (60L * 10L )
76- .withDatafileDownloadInterval (60L * 10L )
77- .build (getApplicationContext ());
77+ .withDatafileDownloadInterval (60L * 10L )
78+ .withSDKKey ("6hmwpgZcRFp36wH5QLK8Sb" )
79+ .build (getApplicationContext ());
7880 }
7981}
You can’t perform that action at this time.
0 commit comments