diff options
author | Orangerot <purple@orangerot.dev> | 2025-01-08 12:13:05 +0100 |
---|---|---|
committer | Orangerot <purple@orangerot.dev> | 2025-01-08 12:13:05 +0100 |
commit | f589cf8e92c043f6cfee7ab9507f5253404a97c4 (patch) | |
tree | 69902a1f6a50e751ad9d131619da6a5d2f8b6b68 | |
parent | 856949ceef752ed22a7fd968432ab052a00348a8 (diff) |
-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) { |