vijai1996 / screenrecorder

NOTICE: This repository has moved to gitlab
https://gitlab.com/vijai/screenrecorder
GNU Affero General Public License v3.0
121 stars 49 forks source link

File storage path to external SD card #20

Closed just-Nob closed 7 years ago

just-Nob commented 7 years ago

Nice application! Anyway, is it possible to set the recording's storage path to something different as the internal storage, especially to the external SD card? Internal storage is rare and valuable...! ;)

vijai1996 commented 7 years ago

Will add this to my To-Do list and will be done at later versions

vijai1996 commented 7 years ago

@just-Nob I'm having a look at this right now and it seems like android locks down apps writing to removable sd to a vast extent. Apps are allowed write access only in their external data directory when the storage is a removable storage. So what it means is, you cannot create random folders say /storage/extSD/myFolder but you are only stuck with writing access in /storage/extSD/Android/data/com.package.app/.

I'm currently looking at a way to overcome this. Will you be able to test the app for me if I have something working? I dont have any physical test device with removable sd support

just-Nob commented 7 years ago

Hi @vijai1996, sorry for my delayed response. For sure I'm able to test your work. Just contact me if you're ready. I have a rooted(!) LG G3, currently running Android Marshmallow. As far as I know, write access won't be granted to any other folder than the app's one without root, at least if you have a device running Android Kit Kat or later - this was one of the main reasons for me to root my device. Anyway, to get access to the SDCard would be a great advantage, cause internal memory is rare on most devices. ;) Free choice would be a nice, but not a necessary feature. Even if write access to SDCard would only be possible with root, many users will call this welcome. Maybe some Android open-source file explorer will give some hints in their source codes...?

vijai1996 commented 7 years ago

Well, that's the exact API limitation. The API allows rw access only to the app's public storage directory for all user installed apps. There is a new permission WRITE_MEDIA_STORAGE introduced in marshmallow but it is secured and limited to system/signature. Any AOSP app's code wont work for the same reason. If you happen to have any FOSS file manager installed and which you are sure would work out of the box with no modification to the system, let me know and I'll have a look.

As for the test, build, I'll run some sanity checks and provide you the app soon for testing. Thanks

vijai1996 commented 7 years ago

@just-Nob Mail me at screenrecorder@orpheusdroid.com and I will give you a test build to download.

just-Nob commented 7 years ago

Hi Vijai,

sorry for the delayed response. Had a bereavement as well as some additional family trouble.

Although the issue is closed anyway, I'ld like to leave a short feedback: Your solution implemented in the current official release works like a charm! :)

So many THX for implementation!