From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs 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 Message-ID: <87bkh191nd.fsf@yahoo.com> References: <4f26284b-7435-7fb1-425b-b50cb886a07a@pm.me> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8443"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64303@debbugs.gnu.org To: Ant Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 27 02:43:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qDwng-00023N-Gx for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Jun 2023 02:43:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDwnU-0008Sc-Rm; Mon, 26 Jun 2023 20:43:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDwnQ-0008SU-2b for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2023 20:43:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDwnP-0007ay-3a for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2023 20:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qDwnO-0004Tr-1t for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2023 20:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Jun 2023 00:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64303 X-GNU-PR-Package: emacs Original-Received: via spool by 64303-submit@debbugs.gnu.org id=B64303.168782655017178 (code B ref 64303); Tue, 27 Jun 2023 00:43:02 +0000 Original-Received: (at 64303) by debbugs.gnu.org; 27 Jun 2023 00:42:30 +0000 Original-Received: from localhost ([127.0.0.1]:47280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDwms-0004T0-E0 for submit@debbugs.gnu.org; Mon, 26 Jun 2023 20:42:30 -0400 Original-Received: from sonic308-10.consmr.mail.ne1.yahoo.com ([66.163.187.33]:43159) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDwmp-0004Sk-PA for 64303@debbugs.gnu.org; Mon, 26 Jun 2023 20:42:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1687826541; bh=fB5xsxCYC9zehAf2EfWGbuMxKHerBiizGxDDrE8iUKE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=dmctLMcZLg9MN2ZucfhApo6Ag8NpJzniJyOvwt4crycg4mNIneS8t57Nt2Rv/nzPWlGumunxALFKrN07eDyZK5xiiSJwSnMihK3tNwKLNDaVoTf6I5JGK0ZMl2RqTU3saxiezjvb8fbniB/ctr/Y4eueIxCt/8EpWU9ZgHzl5uDrBRu+wrq8vhNIQEOm8DpO40zec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cDbI1qzXmQL_lJNEm7qKE8KpJhQ EEoKTxr4jC6hlBnj1fhng1gYKn.DGSw.pBD7KwFwpi8VrmjYN1bObsPRG86Cd96td5Mide7Y59HE nQT9N8OBLcOjNhrW.7Kg30JiEGZWQKXqVW5P1DADLThcTcHK.81TTJwdBQABb.td1Im3HEzIwT7E u3pF8HdjnH3nHag.fMLMboxoYjxLNsAaGohO4lIouEalebA.l_GxYDvIXFB7ABS94LpOC71TyJG9 WUt0TPQ3ikfvEmPDXQwyx09yAYnOxl0xANVyGk.WQtYUXW07mUAA3bJuJhJmXPIb6rlMEA0D3137 sqwQbrv.0g8Vas8aTHjaoPyEhaxlHP7_3P32a50xakt89OLQqeK1cUKQADcPqQe7lsOv_O00y4Lb 3CJkhFNVb5CMQziAB.42CW.KX5TGl9txlU4YLDfKRh X-Sonic-MF: X-Sonic-ID: 0ce88ec6-2b16-4d65-afc9-69820b3f944e Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Tue, 27 Jun 2023 00:42:21 +0000 Original-Received: by hermes--production-sg3-748897c457-llw9p (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 91cf32f403be2e6864343c8f54f7d01f; Tue, 27 Jun 2023 00:42:18 +0000 (UTC) In-Reply-To: <4f26284b-7435-7fb1-425b-b50cb886a07a@pm.me> (Ant's message of "Mon, 26 Jun 2023 16:21:52 +0000") X-Mailer: WebService/1.1.21557 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264117 Archived-At: Ant 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.