diff --git a/android/ScratchJr/app/src/main/java/org/scratchjr/android/JavaScriptDirectInterface.java b/android/ScratchJr/app/src/main/java/org/scratchjr/android/JavaScriptDirectInterface.java index 1f7541e..f61f1f6 100644 --- a/android/ScratchJr/app/src/main/java/org/scratchjr/android/JavaScriptDirectInterface.java +++ b/android/ScratchJr/app/src/main/java/org/scratchjr/android/JavaScriptDirectInterface.java @@ -642,10 +642,11 @@ public class JavaScriptDirectInterface { JSONArray jsonArray = jsonObject.names(); String key = jsonArray.getString(0); String value = jsonObject.getString(key); + _activity.setAnalyticsPref(key, value); } catch (JSONException e) { Log.e(LOG_TAG, "JSON error: " + e.getMessage(), e); + return; } - _activity.setAnalyticsPref(key, value); } } }