kiwix / kiwix-xulrunner

[ARCHIVED] Legacy Kiwix desktop solution for Windows/macOS/Linux
https://download.kiwix.org/release/kiwix-xulrunner/
GNU General Public License v3.0
112 stars 28 forks source link

Improve displaying of storage device list on Android #327

Closed kelson42 closed 7 years ago

kelson42 commented 8 years ago

Currently "Settings" > "Storage" list displays only (1) and (2):

  1. 3.8
  2. 53.7

I think it should looks like:

mhutti1 commented 7 years ago

@kelson42 I think this should now work almost correctly (although the naming of devices is not 100% accurate as there is no way to tell if getExternalStorage is returning internal or external storage)

kelson42 commented 7 years ago

@mhutti1 Here a few remarks after testing:

mhutti1 commented 7 years ago

@kelson42

  1. What I have got it displaying is the fewest duplicate devices that also minimises the risk of not detecting devices. There is no way for us to tell if default is on another device or not. Because of this we must have it separate to private otherwise we risk not identifying a device.

  2. Private does not mean internal storage as there is no concept of internal / external storage just manufacturer implemented suggestions. Private means only our app can access it. This is very likely to be internal but we call it private to distinguish from default which may be internal or external.

  3. and

  4. Yeah I can do this.

  5. This should also be possible but using Private/Default/External

mhutti1 commented 7 years ago

@kelson42 After looking into it it is impossible to do as we agreed in IRC because for example internal storage is mounted to /sdcard on my nexus 5x. Android thinks this is external. It has no concept of if its internal or external. As such as far as I am aware there is no way to tell. As such I think its best to rename external to shared as that is the only think that we know that it is.

mhutti1 commented 7 years ago

@kelson42 Ok so I have come up with a solution. I am not sure if it will work for sure but we can give it a shot and test on some devices.

kelson42 commented 7 years ago

@mhutti1 Great, I will have a look this evening!

kelson42 commented 7 years ago

@mhutti1 Looks good to me now, let see if our users enjoy it too. Well done!