From: Po Lu Date: Fri, 22 Sep 2023 01:36:40 +0000 (+0800) Subject: Enable opening mailto URLs under Android X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d71b9673a07da93cd7651540cd015636b8f66fda;p=emacs.git Enable opening mailto URLs under Android * doc/emacs/android.texi (Android Startup): Mention how mailto URLs are treated by the emacsclient wrapper. * java/AndroidManifest.xml.in: Register `mailto' scheme filters for EmacsOpenActivity. * java/org/gnu/emacs/EmacsOpenActivity.java (startEmacsClient): Extract code that starts Emacs when it isn't already running, and take a list of arguments rather than a single file name. (onCreate): If the scheme is `mailto', escape the URI and call `message-mailto'. --- diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi index b8862b244d2..07b689ca23b 100644 --- a/doc/emacs/android.texi +++ b/doc/emacs/android.texi @@ -158,6 +158,13 @@ opened. @command{emacsclient} wrapper as a program capable of opening ``org-protocol'' links (@pxref{Protocols,,,org, The Org Manual}). +@cindex ``mailto'' links, android + Furthermore, the wrapper is also registered as a program capable of +sending mail to @code{mailto} URIs; when it is invoked to open such a +URL, it calls the function @code{message-mailto} with that URI as its +first argument. This feature does not function when the Emacs server +is not already running. + @node Android File System @section What Files Emacs Can Access on Android @cindex /assets directory, android diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in index 9044725640d..d4017a055dd 100644 --- a/java/AndroidManifest.xml.in +++ b/java/AndroidManifest.xml.in @@ -122,6 +122,21 @@ along with GNU Emacs. If not, see . --> + + + + + + + + + + + + + + +