Android: try to read games for all available storages #534

Closed
fdelapena opened this Issue Aug 9, 2015 · 4 comments

Projects

None yet

4 participants

@fdelapena
Member

Some devices, shows the internal storage as a sdcard, also supporting real sdcard. In my case, when connecting the device to a computer, both storages can be mounted to copy files.

However in some devices when adding games to the real sdcard won't be detected, only for the internal sdcard. I guess this is confusing most people reporting their games are not being detected by Player after following existing instructions. A possible solution is try to list games from all available storages.

@BlisterB
Member

Looks like I'll learn more funny things hahaha.

I didn't look the API yet but there are many ways to proceed :

  • Have a button in the action bar to switch the storage. By default : create and use the external storage.
    • + More comprehensible for user (our target are user which have basic computer science knowledge).
  • Scan all storage and provide just one list.
    • + More easy to use
    • - Not easy to "clean"
    • - Less comprehensible when the user want to deal with his game (delete etc.).
    • - What do we do ? Create an easy rpg folder for all storage at startup ?
  • An another solution : use a File Chooser ?
    • + No more problem
    • - Android doesn't provide one, we'll have to choice a GPL compatible one or make one.

Looks like the first solution is the best, but I have to learn the API to be sure. Maybe a UX paradigme make the second solution better.

But we'll face new funny android thing I think haha. By default Environment.getExternalStorageDirectory() points to my internal memory on my phone, don't know what i'll do when I'll put an sd card hahaha.

@Ghabry
Member
Ghabry commented Aug 14, 2015

There is no API before Android 5 that returns the SD card.
You must parse the mount points on your own.
And the SD card is not writable on some Android 4 versions, so this would need some changes to the EasyRPG code where savegames are stored.

@Zegeri
Member
Zegeri commented Sep 7, 2015

Scan all storage and provide just one list

Are you talking about merging all the lists of games it finds? I don't think many people would actually use multiple easyrpg folders. The ideal solution in my opinion would be finding recursively from / a directory called "easyrpg". All internal and external mounted storages are scanned.

@Ghabry
Member
Ghabry commented Sep 7, 2015

Depends on how long the scanning takes.
I bet this breaks on some random Android systems that report Sym/Hardlinks as "not a symlink" and then loop infinitely, because it's Android.

@Ghabry Ghabry closed this Dec 30, 2015
@Ghabry Ghabry modified the milestone: 0.4.1 Feb 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment