Open SahilRajpal-hub opened 4 years ago
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.
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