<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Troy,</p>
<p>I did not re-attempt to fix the shared data path idea for Android
>= 11.</p>
<p>Since Google introduced their scoped storage model ... I gave up
on it.</p>
<p>On Android versions <= 10, I use the SWORD path
/sdcard/Documents/sword.</p>
<p>On versions >= 11, I store everything in the internal app
directory, and therefore there is no shared data path anymore.</p>
<p>If you happen to figure out a reliable solution for >= 11 and
the new Scoped Storage model, I'd be happy to learn.</p>
<p>For >= 11 I am thinking about introducing a Cloud sync feature
for the sword directory. This could then work with Dropbox and
maybe also OneDrive.<br>
</p>
<p>Best regards,<br>
Tobias<br>
<br>
PS: I had a long summer break this year and was not very active on
this mailing list. Hopefully my participation will increase again
now.<br>
</p>
<br>
<div class="moz-cite-prefix">On 10/22/23 11:51 AM, Troy A. Griffitts
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:5937cf5e-269c-4b69-8bfa-0d4d419c3a45@crosswire.org">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hi Tobias and others with Android SWORD apps.</p>
<p>I am trying to bundle up a new version of Bishop for Android
with the some exciting improvements in the libsword (I'll post
another email about those, Lord willing, soon), and I would like
to check on the latest status for a shared sword path for us.</p>
<p>I have tried again to read about the current ways for apps to
share data and am still unclear what is allowed, without
performing experiments.</p>
<p>Tobias, where did you end up with your data path? I'll do some
investigations with the latest versions of Android images
available from Google and see where the current logic in Bishop
creates data files and report back.</p>
<p>Hope you are all having a wonderful weekend!</p>
<p>Glory to God for salvation in Jesus! And thanks to Him for
life and a warm bed and a roof over our heads and relative
peace. Many don't have those things.</p>
<p>Troy</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 10/4/21 13:10, Troy A. Griffitts
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:84E49A5A-2220-465B-9C85-26DF2AEAEE91@crosswire.org">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
Hi Tobias,<br>
So, I did a bunch of reading when choosing this location and
couldn't find anything that specifically listed which folders
where standard "top level" folders under /sdcard, only that the
changes to the API in newer versions of Android prevented
creation of top level folders under /sdcard. This article
suggested to use 'Music':<br>
<br>
<a
href="https://www.reddit.com/r/androiddev/comments/jn5azi/android_11_dodges_a_bullet_apps_creating_a_folder/?utm_source=amp&utm_medium=&utm_content=post_body"
moz-do-not-send="true">https://www.reddit.com/r/androiddev/comments/jn5azi/android_11_dodges_a_bullet_apps_creating_a_folder/?utm_source=amp&utm_medium=&utm_content=post_body</a><br>
<br>
I didn't think Music was appropriate for us, but Iooked on my
developer images from Google on the latest version of Android
and a few versions back (I only need to go back as far as until
Android still lets me store to /sdcard/sword, because I try that
next if /sdcard/Documents/sword fails), and on my physical
phone, and they all had /sdcard/Documents/ available.<br>
<br>
I am open to better suggestions.<br>
<br>
Again, to sum up where I understand things now:<br>
<br>
Android, pre-10 lets us store to /sdcard/sword<br>
<br>
Android 10 was kind of a mess and wanted everyone to use the new
storage api instead of file paths but still allowed
/sdcard/sword<br>
<br>
Android 11 and later, Google recanted because of pressure from
the community and settled on: file path are officially blessed
again, but no top level folders created by apps under /sdcard,
so we need to choose a folder.<br>
<br>
/sdcard/Documents/sword seemed to exist on all versions of
Android I checked, later than the versions which still supported
/SD card/sword, so I settled with the logic:<br>
<br>
Try in this order to test write access to:<br>
<br>
/sdcard/Documents/sword<br>
/sdcard/sword<br>
[private unshared app storage]/sword<br>
<br>
That's my best attempt. If you have a better suggestion, I am
all ears.<br>
<br>
Troy<br>
<br>
<br>
<div class="gmail_quote">On October 3, 2021 10:56:34 AM MST,
Tobias Klein <a class="moz-txt-link-rfc2396E"
href="mailto:contact@tklein.info" moz-do-not-send="true"><contact@tklein.info></a>
wrote:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<p>Hi Troy,</p>
<p>I can certainly consider /sdcard/Documents as a new base
also for Ezra (haven't tried it yet).</p>
<p>I just did a quick search and I didn't find any official
Android documentation on that particular filesystem path.
Is there something you can point me to?</p>
<p>Best regards,<br>
Tobias<br>
</p>
<div class="moz-cite-prefix">On 9/13/21 12:38 PM, Troy A.
Griffitts wrote:<br>
</div>
<blockquote type="cite"
cite="mid:9de086eb-88b0-460b-9b3c-c246dcfbc141@crosswire.org">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p>Thanks Michael, yes, I also feel we need to not swim
against the Google flow. The problem is that the Google
flow seems to turn at each new release of Android. Be
assured, my goal is to find a common means for us to
share a single install of SWORD modules and to do it the
way Google wants and for as many versions of Android as
practical.</p>
<p>Tobias,</p>
<p>I've had no trouble writing to /sdcard/... from our C++
code, as long as I don't write to the root of /sdcard/.
My change from /sdcard/sword to /sdcard/Documents/sword/
works fine on Android 11.</p>
<p>Can you give /sdcard/Documents/sword/ a try? You can
grab my exact C++ code from the cordova plugin if you
have trouble.</p>
<p><a class="moz-txt-link-freetext"
href="https://crosswire.org/svn/sword/trunk/bindings/java-jni/jni/swordstub.cpp"
moz-do-not-send="true">https://crosswire.org/svn/sword/trunk/bindings/java-jni/jni/swordstub.cpp</a></p>
<p>static void init(JNIEnv *env);<br>
<br>
</p>
<div class="moz-cite-prefix">On 9/13/21 10:32 AM, Tobias
Klein wrote:<br>
</div>
<blockquote type="cite"
cite="mid:a6cdf36c-beaa-301f-4bf5-276a3315cb8e@tklein.info">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p>Dear Troy,</p>
<p>We should certainly align on the directories and keep
it simple.</p>
<p>However, starting from Android 11 Google makes it
really hard for us due to the "Scoped Storage"
concept, see <a class="moz-txt-link-freetext"
href="https://developer.android.com/about/versions/11/privacy/storage"
moz-do-not-send="true">https://developer.android.com/about/versions/11/privacy/storage</a></p>
<p>I couldn't figure out a way to write to /sdcard any
more in my C++ context on Android 11.</p>
<p>As a consequence at the moment I am not using /sdcard
from Android 11 anymore, but only the private app
folder.</p>
<p>For Android < 11 I am using <b>/sdcard/sword</b>,
but for Android >= 11 I have completely disabled
this including the permissions request for <span
style="color: rgb(55, 71, 79); font-family:
"Roboto Mono", monospace; font-size:
14.4px; font-style: normal; font-variant-ligatures:
normal; font-variant-caps: normal; font-weight: 500;
letter-spacing: normal; orphans: 2; text-align:
left; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color:
rgb(248, 249, 250); text-decoration-thickness:
initial; text-decoration-style: initial;
text-decoration-color: initial; display: inline
!important; float: none;">WRITE_EXTERNAL_STORAGE.<br>
</span></p>
<p>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.<br>
</p>
<p>Best regards,<br>
Tobias<br>
</p>
<div class="moz-cite-prefix">On 9/12/21 3:51 PM, Troy A.
Griffitts wrote:<br>
</div>
<blockquote type="cite"
cite="mid:8d508eec-93d2-63bc-93ea-31124cf11468@crosswire.org">
<pre class="moz-quote-pre" wrap="">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: <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:sword-devel@crosswire.org" moz-do-not-send="true">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel" moz-do-not-send="true">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:sword-devel@crosswire.org" moz-do-not-send="true">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel" moz-do-not-send="true">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:sword-devel@crosswire.org" moz-do-not-send="true">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel" moz-do-not-send="true">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
</blockquote>
</blockquote>
</div>
<div style="white-space: pre-wrap"><div class="k9mail-signature">--
Sent from my Android device with K-9 Mail. Please excuse my brevity.</div></div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org" moz-do-not-send="true">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel" moz-do-not-send="true">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
</blockquote>
</body>
</html>