From: Reimar Döffinger Date: Tue, 17 Nov 2015 14:35:10 +0000 (+0100) Subject: Add hacks to help debug download issues. X-Git-Url: http://gitweb.fperrin.net/?a=commitdiff_plain;h=15ee92c4bc9c7d983e21158a0f759b4fd89466f9;hp=643d5c838c10a1892f6078f1fa131a8e0d53864b;p=Dictionary.git Add hacks to help debug download issues. --- diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 9ebc99f..17686f5 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="38" + android:versionName="5.1.1" > = Build.VERSION_CODES.KITKAT) { + getApplicationContext().getExternalFilesDirs(null); + } + if (!dictDir.isDirectory() || !dictDir.canWrite()) { + String dirs = " " + Environment.getExternalStoragePublicDirectory(null); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + File[] files = getApplicationContext().getExternalFilesDirs(null); + for (File f : files) { + dirs += " " + f.getAbsolutePath(); + } + } else { + dirs += " " + getApplicationContext().getExternalFilesDir(null).getAbsolutePath(); + } + Toast.makeText(getApplicationContext(), "Chosen directory not writeable, try one of" + dirs, Toast.LENGTH_LONG).show(); + } return dictDir; }