From 1af92241334962016a707fe5a3efc545bce3db8a Mon Sep 17 00:00:00 2001 From: mossroy Date: Wed, 28 Jan 2015 11:51:20 +0100 Subject: [PATCH] Issue #99 : display some explanations about a bug on Firefox Android It prevents archives to be found on external SD card : the user has to put the archive in the internal storage (if there is enough space). See https://bugzilla.mozilla.org/show_bug.cgi?id=1117136 --- www/js/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/js/app.js b/www/js/app.js index c2a44fe3..88523334 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -240,7 +240,7 @@ define(['jquery', 'title', 'archive', 'util', 'cookies','geometry','osabstractio }); } - if (storages !== null && storages.length > 0) { + if (storages !== null && storages.length > 0 && storages[0].storageName && storages[0].storageName.length > 0) { // Make a fake first access to device storage, in order to ask the user for confirmation if necessary. // This way, it is only done once at this moment, instead of being done several times in callbacks // After that, we can start looking for archives @@ -348,6 +348,10 @@ define(['jquery', 'title', 'archive', 'util', 'cookies','geometry','osabstractio else { alert("Welcome to Evopedia! This application needs a wikipedia archive in your SD-card (or internal storage). Please download one and put it on the device (see About section). Also check that your device is not connected to a computer through USB device storage (which often locks the SD-card content)"); $("#btnAbout").click(); + var isAndroid = (navigator.userAgent.indexOf("Android") !== -1); + if (isAndroid) { + alert("You seem to be using an Android device. Be aware that there is a bug on Firefox (at least for versions 34 and 35), that prevents finding wikipedia archives in a SD-card (at least on some devices. See about section). Please put the archive in the internal storage if Evopedia can't find it."); + } } }