MANAGE_EXTERNAL_STORAGE instead of SAF?

Subforum for discussion and help with ScummVM's Android port

Moderator: ScummVM Team

Post Reply
Vardion
Posts: 5
Joined: Thu Nov 05, 2020 12:01 pm

MANAGE_EXTERNAL_STORAGE instead of SAF?

Post by Vardion »

I didn't want to frabkenstein the 2.7.0 beta thread: would it be possible for ScummVM to request MANAGE_EXTERNAL_STORAGE instead of using SAF? I understand that this permission enables apps to use the File API again. Google has a special policy for this permission, but mentions that it is "not restricted to file managers only".

I recently started playing Gabriel Knight and this reminded me how painfully slow SAF is.
User avatar
Praetorian
ScummVM Developer
Posts: 807
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: MANAGE_EXTERNAL_STORAGE instead of SAF?

Post by Praetorian »

Vardion wrote: Mon Apr 08, 2024 4:19 pm would it be possible for ScummVM to request MANAGE_EXTERNAL_STORAGE instead of using SAF? I understand that this permission enables apps to use the File API again. Google has a special policy for this permission, but mentions that it is "not restricted to file managers only".

I recently started playing Gabriel Knight and this reminded me how painfully slow SAF is.
We have considered the option and yes, we dropped it because the policy heavily implies that ScummVM does not fall in the permitted use cases and thus our app would then be rejected from the Play Store.

But, we have not actually tested implementing, building and submitting such a variation of the app. May be something for a new Android porter to try; although my personal estimation is that few would want to spend their spare time on something that in all likelihood will end up getting rejected.

Ideally, of course, Google would or will optimize SAF so that it gets the much needed performance boost, because yeah, it is terrible.

The current alternative (which may or may not be viable depending on your device and free space) is to use the ScummVM app's storage folders (I suppose the "external" one is more appropriate) to put your games' data files in. This will allow ScummVM to access them without going through SAF, but it will have the drawback that these folders will be erased too when uninstalling the app -- which may or may not be something the user wants.
Post Reply