<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <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">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" 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>