From: Po Lu <luangruo@yahoo.com>
To: Antonio Romano <n58r@pm.me>
Cc: help-gnu-emacs@gnu.org
Subject: Re: [Emacs for Android] How to open file with an external app?
Date: Wed, 23 Aug 2023 07:45:51 +0800 [thread overview]
Message-ID: <s0dh6oqvdxs.fsf@yahoo.com> (raw)
In-Reply-To: <0d6e01a7-7591-4187-8a3d-b3be6cae78fc@pm.me> (Antonio Romano's message of "Tue, 22 Aug 2023 14:49:07 +0000")
Antonio Romano <n58r@pm.me> writes:
> I tried the following
> (android-browse-url
> "content://org.nextcloud.documents/2a368.../Ebooks/effectiveawk.epub")
>
> and got the following error:
>
> java.lang.SecurityException: UID 10713 does not have permission to
> "/content/storage/org.nextcloud.documents/2a3683ac919807f000715758ea81ef61%2F665/Ebooks/effectiveawk.epub"
>
> [user 0]; you could obtain access using ACTION_OPEN_DOCUMENT
> or related
> apis
>
> But I'm pretty sure Emacs has the permission to access the Nextcloud
> document provider, since i can open buffers in it without any
> trouble. Maybe i got the URI wrong?
These permissions are granted exclusively to Emacs, and transferring
them to other programs is not possible.
> I can also open document provider in a file manager called MiXplorer:
> i navigated Nextcloud through it and, strangely enough, it seems that
> MiXplorer gives its own content URIs to files:
>
> "content://com.mixplorer.file/1409260714!/Ebooks/effectiveawk.epub"
It's probably copying the file to a temporary location, which is
subsequently made available to other programs.
>
> which, if gives as argument to (android-browse-url), makes the "Open
> with..." menu appear.
>
> Document providers look like a mess to me. What's the easiest way to
> externally open files in "/content/storage/org.nextcloud/documents/"?
Probably what I outlined above: copy the file to a location in the Unix
VFS (outside /content or /assets), before providing the copy to other
programs.
next prev parent reply other threads:[~2023-08-22 23:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-19 14:57 [Emacs for Android] How to open file with an external app? Antonio Romano via Users list for the GNU Emacs text editor
2023-08-22 12:15 ` Po Lu
2023-08-22 12:23 ` Po Lu
2023-08-22 14:49 ` Antonio Romano via Users list for the GNU Emacs text editor
2023-08-22 23:45 ` Po Lu [this message]
2023-08-23 10:05 ` Antonio Romano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s0dh6oqvdxs.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=help-gnu-emacs@gnu.org \
--cc=n58r@pm.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).