question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Recording audio without access to external storage permission

See original GitHub issue

Version 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
pyzenbergcommented, Jun 22, 2019

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 using getTemporaryDirectory())

0reactions
github-actions[bot]commented, Dec 31, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found