bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64303: 30.0.50; Android build: use Activities as a way to interact w


From: Po Lu
Subject: bug#64303: 30.0.50; Android build: use Activities as a way to interact with emacsclient?
Date: Tue, 27 Jun 2023 08:42:14 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Ant <n58r@pm.me> writes:

> The EmacsActivity.java and EmacsOpenActivity.java files show that it is
> possible to pass argument by means of Android Activities. Furthermore,
> EmacsOpenActivity (the file that handles Emacs selection in "Open
> With..." dialogs) does use emacsclient (or its equivalent
> libemacsclient.so) in order to reuse the same Emacs instance and frame.
>
> It is possible to manually invoke Android Activities (with custom 
> parameters) by means of the
> command "am" in
> the adb shell, the command "am" in the Termux shell or also by means of
> some Androids applications like ActivityManager
> (https://github.com/sdex/ActivityManager) that also allows to make
> shortcuts out of them.
>
> It could be an idea to "generalize" EmacsOpenActivity and to have an
> activity that allows to insert custom parameters that would be fed to
> libemacsclient. EmacsActivity.java already does something similar, by
> means of the extra argument "org.gnus.emacs.STARTUP_ARGUMENT".
>
> One use case would be, trivially, to have a shortcut for
> org-capture or some other org-protocol.
>
> I'm not an Android guru myself and so I don't know whether this is a good
> idea or not, security-wise. Also, I don't know if this is just an hack
> that won't last too long anyway.
>
> I'd like to know your opinions in this regard. Thank you in advance!

Since this will be similar to controlling the Emacs server through ICE
or D-Bus, we should wait a similar feature to be available on free
systems before implementing this on Android.

Otherwise, this sounds like a good idea.  I will see if I can do both.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]