Skip to content

Commit 4e8e2b0

Browse files
committed
Fix errors for when the CK server is unreachable.
1 parent 41be3b3 commit 4e8e2b0

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

app/src/main/java/openscience/crowdsource/video/experiments/MainActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ protected String doInBackground(String... arg0) {
689689

690690
try {
691691
if (getCurl() == null) {
692-
publishProgress("\n Error we could not load scenarios from Collective Knowledge server: it's not reachible ...");
692+
publishProgress("\n Failed to load scenarios: the CK server is unreachable ...");
693693
return null;
694694
}
695695
availableScenariosRequest.put("remote_server_url", getCurl());
@@ -984,10 +984,10 @@ public void run() {
984984
}
985985
publishProgress("\nRecognition result:" + recognitionResultText);
986986

987-
publishProgress("Submitting results and unexpected behavior (if any) to Collective Knowledge Aggregator ...\n");
987+
publishProgress("Submitting results and unexpected behavior (if any) to the Collective Knowledge Aggregator ...\n");
988988

989989
if (getCurl() == null) {
990-
publishProgress("\n Error we could not submit recognition results to Collective Knowledge server: it's not reachible ...");
990+
publishProgress("\n Failed to submit recognition results: the CK server is unreachable ...");
991991
return null;
992992
}
993993
JSONObject publishRequest = new JSONObject();

app/src/main/java/openscience/crowdsource/video/experiments/PlatformFeaturesService.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ public static JSONObject loadPlatformFeaturesFromServer() {
9090
AppLogger.logMessage("User ID: " + AppConfigService.getEmail() + "\n");
9191

9292
AppLogger.logMessage("\n");
93-
AppLogger.logMessage("Testing Collective Knowledge server ...\n");
93+
AppLogger.logMessage("Testing the Collective Knowledge server ...\n");
9494
if (AppConfigService.getRemoteServerURL() == null) {
95-
AppLogger.logMessage("\n Error Collective Knowledge server is not reachible ...\n\n");
95+
AppLogger.logMessage("\n Failed: the CK server is unreachable ...\n\n");
9696
return null;
9797
}
9898
requestObject = new JSONObject();
@@ -300,9 +300,9 @@ public static JSONObject loadPlatformFeaturesFromServer() {
300300

301301
// If CPU is still empty, send report to CK to fix ...
302302
if (pf_cpu.equals("")) {
303-
AppLogger.logMessage("\nPROBLEM: we could not detect CPU name and features on your device :( ! Please, report to authors!\n\n");
303+
AppLogger.logMessage("\nERROR: unable to detect the CPU name and features of your device :( ! Please report to the authors!\n\n");
304304
if (AppConfigService.getRemoteServerURL() == null) {
305-
AppLogger.logMessage("\n Error we could not report about CPU name and feature detection problem to Collective Knowledge server: it's not reachible ...\n\n");
305+
AppLogger.logMessage("\n Failed to report the CPU name and feature detection problem: the CK server is unreachable ...\n\n");
306306
return null;
307307
}
308308
requestObject = new JSONObject();
@@ -490,7 +490,7 @@ public static JSONObject loadPlatformFeaturesFromServer() {
490490
String j_gpu_uid = "";
491491
String j_sys_uid = "";
492492

493-
AppLogger.logMessage("Exchanging info about your platform with CK server to retrieve latest meta for crowdtuning ...");
493+
AppLogger.logMessage("Exchanging platform info with the CK server to retrieve the latest crowdtuning meta info ...");
494494

495495
requestObject = new JSONObject();
496496
JSONObject platformFeatures = new JSONObject();
@@ -509,7 +509,7 @@ public static JSONObject loadPlatformFeaturesFromServer() {
509509
platformFeatures.put("features", ft_os);
510510

511511
if (AppConfigService.getRemoteServerURL() == null) {
512-
AppLogger.logMessage("\n Error we could not exchange platform info with Collective Knowledge server: it's not reachible ...\n\n");
512+
AppLogger.logMessage("\n Failed to exchange platform info: the CK server is unreachable ...\n\n");
513513
return null;
514514
}
515515
requestObject.put("remote_server_url", AppConfigService.getRemoteServerURL());//
@@ -663,7 +663,7 @@ public static JSONObject loadPlatformFeaturesFromServer() {
663663
platformFeatures.put("features", ft_cpu);
664664

665665
if (AppConfigService.getRemoteServerURL() == null) {
666-
AppLogger.logMessage("\n Error we could not exchange platform info with Collective Knowledge server: it's not reachible ...\n\n");
666+
AppLogger.logMessage("\n Failed to exchange platform info: the CK server is unreachable ...\n\n");
667667
return null;
668668
}
669669
requestObject.put("remote_server_url", AppConfigService.getRemoteServerURL());//
@@ -734,7 +734,7 @@ public static JSONObject loadPlatformFeaturesFromServer() {
734734
platformFeatures.put("features", ft_plat);
735735

736736
if (AppConfigService.getRemoteServerURL() == null) {
737-
AppLogger.logMessage("\n Error we could not exchange platform info with Collective Knowledge server: it's not reachible ...\n\n");
737+
AppLogger.logMessage("\n Failed to exchange platform info: the CK server is unreachable ...\n\n");
738738
return null;
739739
}
740740
requestObject.put("remote_server_url", AppConfigService.getRemoteServerURL());//

app/src/main/java/openscience/crowdsource/video/experiments/RecognitionScenarioService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static void loadRecognitionScenariosFromServer() {
121121
try {
122122
String remoteServerURL = AppConfigService.getRemoteServerURL();
123123
if (remoteServerURL == null) {
124-
AppLogger.logMessage("\n Error we could not load scenarios from Collective Knowledge server: it's not reachible ...\n\n");
124+
AppLogger.logMessage("\n Failed to load scenarios: the CK server is unreachable ...\n\n");
125125
return;
126126
}
127127
availableScenariosRequest.put("remote_server_url", remoteServerURL);

0 commit comments

Comments
 (0)