kevinresol / react-native-sound-recorder

Simplest Sound Recorder for React Native
MIT License
119 stars 36 forks source link

Unnecessary READ and WRITE permissions #37

Closed kayzenkayzen closed 4 years ago

kayzenkayzen commented 4 years ago

I am seeing that depending on the directory that is being used to save the file, it is not always necessary to have read and write permissions.

For example if we are saved in PATH_CACHE ( getCacheDir() )

This says the Android documentation:

Apps require no extra permissions to read or write to the returned path since this path lives in their private storage.

kevinresol commented 4 years ago

Does this lib even request any permissions?

irothenbaum commented 4 years ago

Yes, it does request permissions (confirmed on Android). And I can confirm that with microphone permissions allowed, and using PATH_CACHE, it still requests file storage.

kayzenkayzen commented 4 years ago

Does this lib even request any permissions?

Since the last release, yes!

kevinresol commented 4 years ago

Perhaps we should revert #28. I prefer requesting permissions manually in js (e.g. with react-native-permissions)

kayzenkayzen commented 4 years ago

I think it would be better to let the developer ask for the necessary permissions according to their recording configuration.

kevinresol commented 4 years ago

It had been my intention from the beginning. It was my mistake to merge #28.

kevinresol commented 4 years ago

Can anyone PR a fix?

kevinresol commented 4 years ago

f6c33b7a1bfbaa2d32b26ca0abf868f3c729df85