Tasker and Moto Mods

kf6kmx

Well-known member
Jun 16, 2010
92
2
0
Visit site
Ok, this might have been asked before, but if so i missed finding it...

Has anyone seen/heard of plans for a Tasker add-on that can detect Moto Mods??

It would be VERY useful to have a way to determine when, say, the projector is connected (set rotation, start up a specific app, etc).
 

canonBoy

Well-known member
Jul 13, 2010
236
0
0
Visit site
I haven't tried to make a tasker profile for this yet, but I imagine using an AutoApp plugin would do the trick... I'll have to play around w my projector mod and see if I can get tasker to recognize it... if not, maybe just making a Notification Action Button that launches your task you would want to execute when the projector is mounted could get you by till you find a trigger?

https://forums.androidcentral.com/e...ls?id=com.joaomgcd.autoappshub&token=qxtQhNAW
 

canonBoy

Well-known member
Jul 13, 2010
236
0
0
Visit site
So if you make a profile that triggers when the variable %WIN matches 'Projector settings' (without the quotes and only the p capitalized), you can execute anything you want when you push the projector's power button once after it's already projecting. Does that get you going in the right direction at least?
 

kf6kmx

Well-known member
Jun 16, 2010
92
2
0
Visit site
So if you make a profile that triggers when the variable %WIN matches 'Projector settings' (without the quotes and only the p capitalized), you can execute anything you want when you push the projector's power button once after it's already projecting. Does that get you going in the right direction at least?

Definitely right direction. I'll check that out, thanks
 

jesta192

Well-known member
Aug 26, 2010
157
0
0
Visit site
I don't have any Mods to test with, but I'm assuming that there would be some kind of broadcast Intent when a Mod is attached. Doesn't Taker have a way to trigger based on a Broadcast Receive?
 

canonBoy

Well-known member
Jul 13, 2010
236
0
0
Visit site
I don't have any Mods to test with, but I'm assuming that there would be some kind of broadcast Intent when a Mod is attached. Doesn't Taker have a way to trigger based on a Broadcast Receive?

There is an Event Intent Received in Tasker! You wouldn't happen to know from your Tasker programming experience how to find out what to input into the fields? I guess I could look for some intent interception apps too. But maybe some dialog here can help others out?
 

Attachments

  • 43278.jpg
    43278.jpg
    16 KB · Views: 30

canonBoy

Well-known member
Jul 13, 2010
236
0
0
Visit site
OK, so I've been snooping around and found this info from the Moto mod developers site: https://developer.motorola.com/explore/software/mod-management

as well as this from tasker's literature: https://tasker.dinglisch.net/userguide/en/intents.html
-specifically: "Tasker can only receive intents which are sent to broadcast receiver components, not to activities or services."

I've tried several of the intents from the Moto mods developer page in the tasker intent receive event edit, but I'm not coming up with the right combination to elicit the notification I have programmed in the profile. I'm not even sure if tasker is capable to trying to detect the Moto mods this way at all (broadcast receiver vs action vs service).

This is the part of programming that always gets the better of me. I really don't know enough to make any real progress in Java based android coding. Every now and again I can find something somewhere that helps me get by, but in this case, I'm really just guessing as to what goes where. If anyone can shed any light, I'd be more than happy to learn.
 
Last edited:

jesta192

Well-known member
Aug 26, 2010
157
0
0
Visit site
OK, so I've been snooping around and found this info from the Moto mod developers site: https://developer.motorola.com/explore/software/mod-management

as well as this from tasker's literature: https://tasker.dinglisch.net/userguide/en/intents.html
-specifically: "Tasker can only receive intents which are sent to broadcast receiver components, not to activities or services."

I've tried several of the intents from the Moto mods developer page in the tasker intent receive event edit, but I'm not coming up with the right combination to elicit the notification I have programmed in the profile. I'm not even sure if tasker is capable to trying to detect the Moto mods this way at all (broadcast receiver vs action vs service).

This is the part of programming that always gets the better of me. I really don't know enough to make any real progress in Java based android coding. Every now and again I can find something somewhere that helps me get by, but in this case, I'm really just guessing as to what goes where. If anyone can shed any light, I'd be more than happy to learn.
It looks like you're on the right path. The documentation seems to imply that "your app" can register to receive the ACTION_MOD_ENUMERATION_DONE broadcast. But I don't know if Tasker dynamically registers for broadcast intents (or really how it is intents at all for that matter).

Hopefully someone with a bit more Tasker knowledge can fill in the details for you (I switched over to Automate by LlamaLab so I'm not great with Tasker).
 

canonBoy

Well-known member
Jul 13, 2010
236
0
0
Visit site

Attachments

  • 43556.jpg
    43556.jpg
    21.3 KB · Views: 16

Forum statistics

Threads
942,976
Messages
6,916,710
Members
3,158,758
Latest member
davisongeorge