milan-fabian / slideshow-support

Support and issue tracking for Slideshow software
https://slideshow.digital/
15 stars 1 forks source link

External storage detection issue #60

Open venetin opened 1 week ago

venetin commented 1 week ago

Hello,

The Slideshow app not always can detect properly the external storage paths. Furthermore the app does not support the Android storage access framework which is the recommended way to access external sd cards. From a several devices (Android tablets) only on one device the external storage was properly detected. It seems that the Slideshow app is only looking at the /mnt for external storage but for some reason it can't detect properly all external storages. And even if the storage path is detected properly the app can only use the app data folder located at /Android/data on the sd card because of the missing SAF support. Because the app settings are stored in the settings.xml file which is accessible without root the storage path can be set manually in this file. But anytime the user change and save any setting in the device settings page in the web ui the storage path will be deleted. This is happenning because in the web ui dropdown the internal stogae is preselected. I have 2 proposals how this can be workarounded:

  1. Add the ability to set a custom path in the advanced settings of the app. I think that this will be a small change because it will affect only the web ui. The drawback is that only the app data folder inside e.g /mnt/ext_sdcard/Android/data can be used. Because of the lack of the SAF support.
  2. Proper SAF support. The drawback in this case is the fact that a proper SAF support needs a lot of effort.

As a workaround I set a custom "sed" command which will apply the proper path to the settings.xml on every start of the app so I can workaround the situation when the external storage path is removed when the settings are chaged/saved for some reason. The only drawback is that two reloads of the app are needed to have back the proper storage path.

Regards, Venetin

milan-fabian commented 1 week ago

Hello,

Thank you for your thorough research.

As far as I know, Android storage access framework requires manual input from the user on the screen of the Android device, in order to choose which media to access. That would be quite counterproductive, as it would require manual input each time there is a new external storage available. Additionally, creating new files and folders through File manager in the web interface probably wouldn't work as expected.

Could you please help me understand what kind of flow you would expect with SAF?

Milan

venetin commented 5 days ago

Hello,

Normally if the SAF is supported, the user is redirected to the "stock file manager" where he gives a permission to the app to write on the sd card. Because implementing a proper SAF support probably is not important for you (as far as understand the main target for the app is to be used on a chinese Android boxes which are rooted out of the box) my proposal is just to make possible for the users to enter manually the external storage location via the webUI. Currently the storage location is selected via a dropdown which prevents the manual input. This way the user will be able select only the app folder within /Android/data on the sd card (because there is no SAF) but this is sufficient for the case when the app can't detect properly the external storage.

Regards, Venetin