diff --git a/src/androidTest/java/com/nutomic/syncthingandroid/test/syncthing/SyncthingServiceTest.java b/src/androidTest/java/com/nutomic/syncthingandroid/test/syncthing/SyncthingServiceTest.java index 6e633506..06630a0c 100644 --- a/src/androidTest/java/com/nutomic/syncthingandroid/test/syncthing/SyncthingServiceTest.java +++ b/src/androidTest/java/com/nutomic/syncthingandroid/test/syncthing/SyncthingServiceTest.java @@ -69,7 +69,7 @@ public class SyncthingServiceTest extends ServiceTestCase { latch.countDown(); } }); - latch.await(5, TimeUnit.SECONDS); + latch.await(1, TimeUnit.SECONDS); assertNotNull(getService().getApi()); assertNotNull(getService().getWebGuiUrl()); } diff --git a/src/main/java/com/nutomic/syncthingandroid/activities/FolderPickerActivity.java b/src/main/java/com/nutomic/syncthingandroid/activities/FolderPickerActivity.java index 877b35de..a9d209cc 100644 --- a/src/main/java/com/nutomic/syncthingandroid/activities/FolderPickerActivity.java +++ b/src/main/java/com/nutomic/syncthingandroid/activities/FolderPickerActivity.java @@ -74,7 +74,7 @@ public class FolderPickerActivity extends SyncthingActivity // Populate roots. ArrayList roots = new ArrayList<>(); - if (android.os.Build.VERSION.SDK_INT >= 19) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { roots.addAll(Arrays.asList(getExternalFilesDirs(null))); } roots.add(Environment.getExternalStorageDirectory()); @@ -96,6 +96,11 @@ public class FolderPickerActivity extends SyncthingActivity } else { displayRoot(); } + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + Toast.makeText(this, R.string.kitkat_external_storage_warning, Toast.LENGTH_LONG) + .show(); + } } @Override diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 24275ce0..9417df7e 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -287,6 +287,9 @@ Please report any problems you encounter via Github. Folder Picker + + Warning: Your Android version does not allow syncing to external storage devices + Directory is Empty