Recording audio without access to external storage permission
See original GitHub issueVersion of flutter_sound
1.4.1
flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [✓] Android Studio (version 3.3) [✓] VS Code (version 1.31.1) [✓] Proxy Configuration [✓] Connected device (1 available)
• No issues found!
Platforms you faced the error (IOS or Android or both?)
Android and presumably IOS
Expected behaviour
Write into temporary directory provided by path_provider
without requiring access to external storage.
Actual behaviour
Unhandled Exception: Exception: PlatformException(FlutterSoundPlugin, NO PERMISSION GRANTED, android.permission.RECORD_AUDIO or android.permission.WRITE_EXTERNAL_STORAGE)
Tested environment (Emulator? Real Device?)
Real Device with Android 7.0
Steps to reproduce the behavior
Directory tempDir = await getTemporaryDirectory();
final ms = DateTime.now().millisecondsSinceEpoch.toString();
final audioFileName = '${tempDir.path}/$ms.m4a';
_outputAudioPath = await flutterSound.startRecorder(audioFileName);
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
Recording audio without access to external storage permission
Write into temporary directory provided by path_provider without requiring access to external storage. Actual behaviour. Unhandled Exception: ...
Read more >Record a video meeting - Google Meet Help
Recordings are saved to the organizer's Meet Recordings folder in My Drive. An email with the recording link is sent to the meeting...
Read more >Managing and sharing cloud recordings - Zoom Support
How to access recording management in Zoom; How to share, download, and delete ... Search to filter recordings by date range, host, or...
Read more >App permissions - Microsoft Support
Learn how to locate and manage your app permissions on Windows devices. Some apps or games need specific permissions to work properly.
Read more >Access media files from shared storage | Android Developers
If scoped storage is enabled, the collection shows only the photos, videos, and audio files that your app has created. Most developers won't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, I think I won’t deliver my intention. You are right, I workaround the issue by asking permission from user. But my original question was, is it possible to get a
File()
instance without writing it to storage? (i.e. in-memory file or a temp file usinggetTemporaryDirectory()
)This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.