momodalo / vimtouch

vimtouch
Apache License 2.0
350 stars 71 forks source link

Removed intent from InstallProgress activity #8

Closed rtfb closed 11 years ago

rtfb commented 11 years ago

It doesn't seem to work in any useful way, but displays an extra "Vim Touch" item in the list of choices, thus confusing the user.

momodalo commented 11 years ago

I pushed another patch to help user to understand what is what. https://github.com/momodalo/vimtouch/commit/b8b1327b0dcd24cdd2cc967369df4fe087fdd215

rtfb commented 11 years ago

Ah, got it. I should've paid closer attention to the .vrz thing.

My biggest concern was (and still is) that this action is among the possible ones even when I click on things like .txt. That is outright wrong. After some fiddling around, I came up with this pair of intents: https://gist.github.com/ddc6653902834c3dc0ba

One handles URL interception in web browser, another one in file browser. Unfortunately, the second one works inconsistently (see links in the answer here: http://stackoverflow.com/questions/8212027/datafiletype-custom-wont-open-im-my-app), but that seems to be as good as we can get without bothering users for unrelated file types.

Do you find this solution acceptable?

(I reopen that as an issue until we find some solution)

momodalo commented 11 years ago

I think the local intent-filter may work fine

The http/ftp intent filter is not necessary because I prefer to use download manager to download it and open from there later. Instead of handing the http download by vimtouch.

I will try the solution later and see if we can close this.

momodalo commented 11 years ago

Bad news is I tried the solution but it can't open the *.vrz from DownloadManager which is the major place I would like user to get the file. Good news is after reviewing your gist, I switch to a new process and removed all local file intent filter to avoid confusing user. The process becomes

User choose "extra download" from menu => use browser to open download website => download xxx.vrz => InstallProgress intent-filter => InstallProgress triggers DownloadManager to download the file => InstallProgress received the DOWNLOAD_COMPLETE broadcast => install the downloaded content => finish

So we can simply use a website to collect *.vrz and the download/install process will be launched automatically when user click the link. It looks perfect for me now and thank you for the ideas and discussion :)

https://github.com/momodalo/vimtouch/commit/e0a5e2a715511ad499161a2bc5dcb0d1de0238d5