diff --git a/android/ScratchJr/app/src/main/AndroidManifest.xml b/android/ScratchJr/app/src/main/AndroidManifest.xml
index 54c2317..aa70b33 100644
--- a/android/ScratchJr/app/src/main/AndroidManifest.xml
+++ b/android/ScratchJr/app/src/main/AndroidManifest.xml
@@ -6,6 +6,7 @@
+
diff --git a/android/ScratchJr/app/src/main/java/org/scratchjr/android/ScratchJrActivity.java b/android/ScratchJr/app/src/main/java/org/scratchjr/android/ScratchJrActivity.java
index 72a1285..e728e02 100644
--- a/android/ScratchJr/app/src/main/java/org/scratchjr/android/ScratchJrActivity.java
+++ b/android/ScratchJr/app/src/main/java/org/scratchjr/android/ScratchJrActivity.java
@@ -183,9 +183,11 @@ public class ScratchJrActivity
public void requestPermissions() {
cameraPermissionResult = ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA);
micPermissionResult = ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO);
+ readExtPermissionResult = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);
if (cameraPermissionResult == PackageManager.PERMISSION_GRANTED
- && micPermissionResult == PackageManager.PERMISSION_GRANTED) {
+ && micPermissionResult == PackageManager.PERMISSION_GRANTED
+ && readExtPermissionResult == PackageManager.PERMISSION_GRANTED) {
return;
}
@@ -196,6 +198,9 @@ public class ScratchJrActivity
if (micPermissionResult != PackageManager.PERMISSION_GRANTED) {
tmp.add(Manifest.permission.RECORD_AUDIO);
}
+ if (readExtPermissionResult != PackageManager.PERMISSION_GRANTED) {
+ tmp.add(Manifest.permission.READ_EXTERNAL_STORAGE);
+ }
Object[] tmpArray = tmp.toArray();
String[] desiredPermissions = Arrays.copyOf(tmpArray, tmpArray.length, String[].class);
@@ -216,6 +221,9 @@ public class ScratchJrActivity
if (permission.equals(Manifest.permission.RECORD_AUDIO)) {
micPermissionResult = grantResults[permissionId];
}
+ if (permission.equals(Manifest.permission.READ_EXTERNAL_STORAGE)) {
+ readExtPermissionResult = grantResults[permissionId];
+ }
permissionId++;
}
}