Register for more Intents actions on Android
* java/AndroidManifest.xml.in <EmacsOpenActivity>: Register for SEND Intents with mailto URIs. * java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Use Intent constants rather than string literals.
This commit is contained in:
parent
a1b8c2610a
commit
16462b1a62
2 changed files with 6 additions and 5 deletions
|
@ -270,6 +270,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. -->
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND"/>
|
||||||
<action android:name="android.intent.action.SENDTO"/>
|
<action android:name="android.intent.action.SENDTO"/>
|
||||||
<data android:scheme="mailto"/>
|
<data android:scheme="mailto"/>
|
||||||
<category android:name="android.intent.category.DEFAULT"/>
|
<category android:name="android.intent.category.DEFAULT"/>
|
||||||
|
|
|
@ -422,11 +422,11 @@ private class EmacsClientThread extends Thread
|
||||||
|
|
||||||
/* Now see if the action specified is supported by Emacs. */
|
/* Now see if the action specified is supported by Emacs. */
|
||||||
|
|
||||||
if (action.equals ("android.intent.action.VIEW")
|
if (action.equals (Intent.ACTION_VIEW)
|
||||||
|| action.equals ("android.intent.action.EDIT")
|
|| action.equals (Intent.ACTION_EDIT)
|
||||||
|| action.equals ("android.intent.action.PICK")
|
|| action.equals (Intent.ACTION_PICK)
|
||||||
|| action.equals ("android.intent.action.SEND")
|
|| action.equals (Intent.ACTION_SEND)
|
||||||
|| action.equals ("android.intent.action.SENDTO"))
|
|| action.equals (Intent.ACTION_SENDTO))
|
||||||
{
|
{
|
||||||
/* Obtain the URI of the action. */
|
/* Obtain the URI of the action. */
|
||||||
uri = intent.getData ();
|
uri = intent.getData ();
|
||||||
|
|
Loading…
Add table
Reference in a new issue