diff options
-rw-r--r-- | android/app/src/main/AndroidManifest.xml | 4 | ||||
-rw-r--r-- | lib/level_selection.dart | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 1499c1a..814f033 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,9 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android"> <!-- The following permission is related to the eSense library --> + +<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> +<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" /> +<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" /> diff --git a/lib/level_selection.dart b/lib/level_selection.dart index 08c0f12..33d8c8b 100644 --- a/lib/level_selection.dart +++ b/lib/level_selection.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; +import 'package:permission_handler/permission_handler.dart'; import 'package:sense_the_rhythm/esense_connect_dialog.dart'; import 'package:sense_the_rhythm/esense_input.dart'; import 'package:sense_the_rhythm/simfile.dart'; @@ -43,6 +44,7 @@ class _LevelSelectionState extends State<LevelSelection> { } Future<void> selectFolder() async { + await Permission.manageExternalStorage.request(); String? selectedFolder = await FilePicker.platform.getDirectoryPath(); if (selectedFolder != null) { |