Re: [feature][support] respond to generic edit intent

62 views
Skip to first unread message

David Tao

unread,
Sep 27, 2012, 6:12:46 PM9/27/12
to Scott Mcdermott, vimtouch...@googlegroups.com
Hi,
Source code speaks. Here is the intent-filter we used in vimtouch AndroidManifest.xml

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.EDIT" />
                <action android:name="android.intent.action.PICK" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="text/*" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <action android:name="android.intent.action.EDIT" />
                <action android:name="android.intent.action.PICK" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="application/octet-stream" />
                <data android:mimeType="application/javascript" />
                <data android:mimeType="application/json" />
                <data android:mimeType="application/atom+xml" />
                <data android:mimeType="application/soap+xm" />
                <data android:mimeType="application/xhtml+xml" />
                <data android:mimeType="application/xml-dtd" />
                <data android:mimeType="application/x-latex" />
                <data android:mimeType="application/*xml" />
                <data android:mimeType="application/ecmascript" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.googlecode.android_scripting.action.EDIT_SCRIPT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

br,
David

On Fri, Sep 28, 2012 at 5:16 AM, Scott Mcdermott <scott.m....@gmail.com> wrote:

Vim Touch Developers,

is it my imagination or does vim-touch only fire on intent with filename having '.txt' extension? is there some way to force it to show up in the share picker for ANY edit intent and not just ones with specific filenames? I.e. can it do text/plain?

in particular I managed to intercept android.intent.action.EDIT and .SEND in two cases where I would have expected vim to show up as an option.

Is this something you -- the developer -- or me -- the user -- must implement?

Thanks.

--
Scott


Scott Mcdermott

unread,
Oct 9, 2012, 5:24:13 PM10/9/12
to David Tao, vimtouch...@googlegroups.com

Here is a captured intent using "send" action on text from a clipboard viewer that I would have expected to come up with vim in the pick list.  I see that SEND is not in the filter, but looks like DEFAULT using text/plain mimetype might have been intended to pick it up?

EOM

Action: android.intent.action.SEND
Data: null
Uri: null
Type: text/plain

Bundle:
Object 1:
Class: java.lang.String
Key: android.intent.extra.TEXT
...
[truncated plaintext data]
...

22 activities match this intent:
com.android.bluetooth
com.google.android.apps.plus
com.google.android.gm
com.facebook.orca
com.nightshadelabs.anotherbrowser
com.ngc.fora
com.google.android.apps.googlevoice
com.easyshare.android
com.ideashower.readitlater.pro
com.facebook.katana
com.joaomgcd.autoremote
com.joaomgcd.autoremote
com.instapaper.android
fi.rojekti.clipper
pl.immortal.instafetchpro.am
org.thialfihar.android.apg
ch.teamtasks.tasks.paid
com.google.android.apps.docs
net.fro9.android.app.clipintent
com.andmadesoft.share.pro
com.kaitenmail

Scott Mcdermott

unread,
Oct 9, 2012, 5:43:28 PM10/9/12
to David Tao, vimtouch...@googlegroups.com


ok so I see after trying to reproduce that there are two main cases where vim does not appear in the picklist where perhaps it should (possibly under control of some setting as to whether or not it does):

  - action EDIT or VIEW but type is NULL
  - action SEND, even with type text/plain

Even though it's probably technically correct for it not to appear, I do think it's useful still.  It's difficult to get every app in the market that deals with text, for example, to add an EDIT action, when most already have a generic SEND.

David Tao

unread,
Oct 12, 2012, 10:22:03 AM10/12/12
to Scott Mcdermott, vimtouch...@googlegroups.com
Hi,
From my point of view, yes, SEND can be handle by VimTouch but it can be better than just handle it as EDIT. For example, maybe we can get the SEND received and put the text in the clipboard or something else. 

br,
David
Reply all
Reply to author
Forward
0 new messages