Sound_Recorder / WRITE permission (no automatic request)

The Sound_Recorder component does not automatically request WRITE permission (if you want to save the soundRec file to a non-app-specific folder / external storage, eg the default folder:
storage/emulated/0/My Documents/Recordings/app_inventor_1580478577579.3gp).

However, the file component does.

So if you press the “startRec” button, you get the error message: "Error 908: The permission WRITE_ ... has been denied. Please …"

However, if you click on the saveReadText button, WRITE is automatically requested. Then you can also click button 1 (startRec) to start the recording and save it in the external storage (without having previously requested this permission manually, eg at Screen.Initialize).

@ewpatton The automatic request for WRITE permission for the Sound_Recorder should therefore be added (only if saving in external storage). Or is there any reason for this?

WRITE_soundRec.aia (2.6 KB)

Note: If I create an app-specific folder and save the soundRec file there, everthing works fine as it is (correct, because in this case no WRITE permission is needed):

1 Like

Hi @Anke,

Thanks for pointing this out. It was likely an oversight on our part. Since the companion requests external write permission up front we likely missed that the SoundRecorder should also be asking in compiled apps but wasn’t.

1 Like

Btw, same thing in Kodular. But there also the File component doesn’t request WRITE permission automatically.

My guess there is that they’ve modified the file component to write to the app-private storage rather than external storage by default. In that case, you don’t need to automatically request unless you were sure you were writing to the external storage. Since most of our stuff focuses on external storage it makes more sense as a default to ask for it (but it is conditional).

I don’t think so, because the File component (in Kodular) automatically requests READ permission.

I’ll ask the Kodular team, but it is a pity that I can not refer to this thread, since it is private (only for power user). So I have to explain everything again. Or is there any other way, to refer to these posts.

… ok, thanks for the tip, I’ve moved it to the Bugs category.