Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error! External storage (SD card) is not available for writing. #69

Open
SahilRajpal-hub opened this issue May 27, 2020 · 1 comment
Open

Comments

@SahilRajpal-hub
Copy link

SahilRajpal-hub commented May 27, 2020

When is started the recording it gave me toats "Error! External storage (SD card) is not available for writing." . I searched the error lines and found a bug in these lines of RecordFragment.java class in startRecording() function

if (!folder.exists()) { // a folder for sound recordings doesn't exist -> create the folder boolean ok = Paths.isExternalStorageWritable() && folder.mkdir(); if (!ok) { EventBroadcaster.send(getContext(), R.string.error_mkdir); return false; } }

i found that mkdir() was giving false. i.e. folder is not created

@SahilRajpal-hub
Copy link
Author

SahilRajpal-hub commented May 27, 2020

I am newbie so plz make me correct if i am wrong.
The directory used to store recording is Music/SoundRecording , therefore I replaced mkdir() with mkdirs() and everything worked OK , since mkdirs() also creates the parent directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant