[sword-devel] New shared common SWORD path on Android
Tobias Klein
contact at tklein.info
Mon Sep 13 04:32:39 EDT 2021
Dear Troy,
We should certainly align on the directories and keep it simple.
However, starting from Android 11 Google makes it really hard for us due
to the "Scoped Storage" concept, see
https://developer.android.com/about/versions/11/privacy/storage
I couldn't figure out a way to write to /sdcard any more in my C++
context on Android 11.
As a consequence at the moment I am not using /sdcard from Android 11
anymore, but only the private app folder.
For Android < 11 I am using */sdcard/sword*, but for Android >= 11 I
have completely disabled this including the permissions request for
WRITE_EXTERNAL_STORAGE.
I wonder whether there is still any way to still use /sdcard/* in
Android >= 11 in the C++ context ... I haven't found a solution yet and
it seems rather complicated.
Best regards,
Tobias
On 9/12/21 3:51 PM, Troy A. Griffitts wrote:
> Dear all,
>
> I've been updating Bishop to work on newer versions of Android and have
> found that we are running into problems trying to create the
> "Nonstandard top-level folder" 'sword' at the root of the common storage
> folder.
>
> Tobias, I know a while back you mentioned that you had to update Ezra
> for Android recently, but it has been a long while since we talked about
> it and I'd like to know if you've had any updated thoughts on what
> you're doing there.
>
> Any other mobile Android devs have any thoughts.
>
> For now, I have updated our cordova plugin (and thus Bishop) to check
> and if possible use paths in this preferred order:
>
> "/sdcard/Documents/sword"
>
> "/sdcard/sword"
>
> ((android.app.Application)
> app).getApplicationContext().getFilesDir().getAbsolutePath();
>
> And we are augmenting modules from AndBible:
>
> "/sdcard/Android/data/net.bible.android.activity/files"
>
> ... but I'd prefer not to do this any longer, once we all agree and
> implement storing files in a common location.
>
> Any thoughts?
>
> Troy
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20210913/71316292/attachment.html>
More information about the sword-devel
mailing list