Automagic as "default" handler for some intents?

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Automagic as "default" handler for some intents?

Post by kintrupf » 13 Nov 2015 07:55

Is it possible to register Automagic as a default handler for some contexts or intents?
So, for example, if I want to open an epub file, Automagic would show up in the list of Apps offered along with the other eBook-Readers?
I could then select Automagic as the default handler of epub files, do some processing, and then open the actual eBook-Reader with the file.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Automagic as "default" handler for some intents?

Post by Martin » 14 Nov 2015 19:01

Unfortunately this is difficult to achieve since such intents are usually 'activity intents' that need to be registered upfront by the app in the manifest of the app. It's not possible to dynamically register for such intents at a later time, for example when a trigger is registered.
This means that Automagic would have to be provided with all possible intents defined in the manifest, Automagic would pop-up as an option for every such intent which might not be desirable for most users.

As a workaround you could use a file manager to select the epub file and use the send/share feature to send the file/path of the file to Automagics trigger 'Send/Share Intent Received'.

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: Automagic as "default" handler for some intents?

Post by kintrupf » 16 Nov 2015 09:54

Martin wrote:Unfortunately this is difficult to achieve since such intents are usually 'activity intents' that need to be registered upfront by the app in the manifest of the app. It's not possible to dynamically register for such intents at a later time, for example when a trigger is registered.
This means that Automagic would have to be provided with all possible intents defined in the manifest, Automagic would pop-up as an option for every such intent which might not be desirable for most users.

As a workaround you could use a file manager to select the epub file and use the send/share feature to send the file/path of the file to Automagics trigger 'Send/Share Intent Received'.
I was afraid it would not be possible :(
Unfortunately, using the send/share feature is not an option. The e-Book management app does not have this option, and using a file manager to open a book somehow beats the purpose of using a specialized management app ;)
Maybe I can cook something up with a File Observer trigger something like that...

Post Reply