Skip to content

Commit 4a9246d

Browse files
committed
fixing new API
1 parent 730d984 commit 4a9246d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package openscience.crowdsource.video.experiments;
1818

19+
import android.Manifest;
1920
import android.app.AlertDialog;
2021
import android.content.DialogInterface;
2122
import android.content.Intent;
@@ -245,6 +246,12 @@ public void onClick(View v) {
245246
}
246247
});
247248

249+
if (Build.VERSION.SDK_INT>Build.VERSION_CODES.LOLLIPOP_MR1) {
250+
String[] perms = { Manifest.permission.READ_EXTERNAL_STORAGE,
251+
Manifest.permission.WRITE_EXTERNAL_STORAGE};
252+
requestPermissions(perms, 200);
253+
}
254+
248255
initConsole();
249256

250257
startStopCam = (Button) findViewById(R.id.btn_capture);

0 commit comments

Comments
 (0)