Is it possible, via File Manager, to set up which app I'd like to open a file with?
-
I have a Nexus 5 with Ubuntu Touch. When I select a file via File Manager, I'm given the option of "Open with another app". When I press this, it lists some options. In the case of videos, it lists OpenStore, Media Player, Messaging, and Gallery. The problem is that Media Player doesn't work with videos on my phone. However, the app UTmedia does successfully play video files on my phone. So, I'm wondering how I can add the option of UTmedia as an app to File Manager's list of options for opening video files.
-
@MarkG_108
I have the same desire for "Crazy Mark" - a markdown editor that I like to use.I might well be wrong, but I think it might be to do with the app, rather than the OS... FWIW, I filed a feature request for Crazy Mark.
-
Yes, @3arn0wl is right, it's a feature you have to request from the app.
The app can access data from 2 ways, asking for a link from several other apps (like UTMedia does at the moment) or they can notify the system they are able to open some kind of files, so when you try to open a specific file from the file manager or you want to share some file from another app, the app will be an available option.
See here for more and better information : http://docs.ubports.com/en/latest/appdev/guides/contenthub.html#different-ways-of-sharing-the-content@MarkG_108 the best way to have this feature is to make a request (if not existing) there : https://github.com/nfsprodriver/UTmedia/issues
-
Thanks for that, @AppLee
-
@AppLee, yes, thanks for the answer. The reason I was looking to see if I could get File Manager to open the file is because it's very difficult to open files via UTmedia (as described here: https://github.com/nfsprodriver/UTmedia/issues/2) -- the selection of files doesn't work well in UTmedia -- it requires a high degree of messing around before the file gets selected. Anyway, since this already has been flagged in the UTmedia site (though it's archived and doesn't appear to be an issue that's being worked on), perhaps I'll make a request in the File Manager site.
-
@3arn0wl you're welcome
@MarkG_108
On file manager side nothing can be done to fix this behavior.
If you read the issue, the last comment may help you ; select the field, then click the button to pick your video.
Then use File Manager... It works fine for me.In fact I have problems to import videos from the Gallery app, but from FileManager it's fine.
As it has already been flagged, you can provide an update with the version you're using and your phone and OTA so the maintainer is pinged and so he gets information that could help him figure out how to solve this...
-
@AppLee, thanks. Yes, I think UTmedia acts differently on the Nexus 5, which I'm using, than whatever phone you may have. With my phone, UTmedia does offer the File Manager as an option to choose the file to play, but after doing so, nothing. The only thing that works is going to File Manager first, copying the file, and then opening UTmedia and pasting the file name into the space -- and this often takes a couple of tries.
I did recompile the UTmedia app, with clickable, to include a manifest.json file and a content-hub.json file, to direct it to allow File Manager to recognize it as an alternative app to open video files.Here's the content-hub.json I made, which I put in a created directory of UTmedia:
{ "destination": [ "videos" ], "share": [ "videos" ], "source": [ "videos" ] }
It already had a manifest.json file, but I added the following to it under "hooks":
"content-hub": "UTmedia/content-hub.json"
This worked, in that File Manager gave me the option of using UTmedia to open the file. But, while this opened the program UTmedia, the file did not open with it. So, for me, the only way to do it is to copy the file and paste it into the file open slot of UTmedia, as I mentioned previously.
-
@MarkG_108
Oh, you tried to modify UT media, nice try.
But you were missing some part, check out this : http://docs.ubports.com/en/latest/appdev/guides/importing-CH-urldispatcher.htmlTo import you need to create the hook that will be able to handle the incoming video, not just declare that app can handle it.
Hope you'll manage to make it work.
-
@AppLee, thanks again. I will look at the link you provided for modifying the app. In the meantime, I did provide some feedback on the GitLab page of the site: https://gitlab.com/nfsprodriver/UTmedia/issues/2
-
-
@MarkG_108 Yes indeed I didn't look at UT Media's code before.
I guess you can make a QML container for UT Media's code, or maybe there is something in JS, but I don't know much about it.
QML and C++ I can do, web technologies is like ancient greek for me ^^It's a question for the UBPorts app development group :
https://t.me/UbuntuAppDevEN