Moto Mods and Tasker

142 views
Skip to first unread message

Gal Ntwo

unread,
Feb 15, 2017, 12:00:26 AM2/15/17
to Tasker
Just wondering about the possibility of having tasker recognize when a Moto mod is attached to a Moto Z to be able to launch some tasks. Anyone done this yet?

Pent

unread,
Feb 15, 2017, 1:05:17 AM2/15/17
to Tasker
Here are the docs from motorola:

https://developer.motorola.com/explore/software/mod-management

You can try Tasker's Intent Received event to detect action

com.motorola.mod.ModManager.ACTION_MOD_ATTACH

Pent

Gal Ntwo

unread,
Feb 15, 2017, 8:28:16 PM2/15/17
to Tasker
And then as far as the Cat Cat Scheme and Mime Type, I couldn't see in the mods developer site what should go in those fields...

Jay M

unread,
Feb 15, 2017, 8:33:55 PM2/15/17
to Tasker

there probably not used then try leaving them blank


On Thu, 16 Feb 2017, 01:28 Gal Ntwo, <galaxy....@gmail.com> wrote:
And then as far as the Cat Cat Scheme and Mime Type, I couldn't see in the mods developer site what should go in those fields...

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.
--

Jay M ︻芫══一

Message has been deleted

Gal Ntwo

unread,
Feb 15, 2017, 11:22:11 PM2/15/17
to Tasker
I tried them blank, and combinations of Blank and Default in the two Cat fields. It's still not catching when I connect the mod.

Pent

unread,
Feb 16, 2017, 12:37:02 AM2/16/17
to Tasker
Sorry, looking at the docs again it seems they send this to activities, not BroadcastReceivers,
and probably statically declared, so I would have to build it in to Tasker, and I probably can't justify the time for
such a tiny subset of users unfortunately.

Pent

Gal Ntwo

unread,
Feb 16, 2017, 7:15:59 PM2/16/17
to Tasker
Understood... thanks for looking into it. I am wondering though, every time a Moto Mod is attached, there is a toast that appears, similar to the Alert/Flash function available in tasker, that has the text 'MotoMod Connected' on the first line, then on the second line of the same flash it reports the Mod's battery percent.

Is there any way to detect an Alert/Flash in a context? I've tried to simulate it whithin tasker (producing the toast and getting the right context to notice it), but the only context I can find is for notifications. And the Moto Mod notification isn't triggering the 'notification event context' in tasker, even with no app and no title (* and * in both those fields).

Rich D

unread,
Feb 16, 2017, 8:42:36 PM2/16/17
to Tasker Google Groups Post
Understood... thanks for looking into it. I am wondering though, every time a Moto Mod is attached, there is a toast that appears, similar to the Alert/Flash function available in tasker, that has the text 'MotoMod Connected' on the first line, then on the second line of the same flash it reports the Mod's battery percent.



You could see if it changes the window value.  Make a profile with a context of event/ variable set : %WIN


then in the task flash %WIN


You need tasker selected in your android accessibility  settings for %WIN to be set. 


Have  you tried the state / sensor / magnetic field      context?

Abdullah Alahdal

unread,
Feb 16, 2017, 10:49:22 PM2/16/17
to Tasker
AutoNotification intercepts Toasts.
Message has been deleted
Message has been deleted

Gal Ntwo

unread,
Feb 17, 2017, 8:58:57 AM2/17/17
to Tasker
I've done testing the %WIN variable, which works, but the mod doesn't change the %WIN till the projector mod is actually powered on and the projector power button is pressed (again) momentarily for the projector settings screen to pop up.

That's an interesting thought about the magnetic field though... I'll have to check that one out! Thanks!

Gal Ntwo

unread,
Feb 17, 2017, 9:00:25 AM2/17/17
to Tasker
I'll have to check out the AutoInput solution too... good idea. Thanks!

Gal Ntwo

unread,
Mar 7, 2017, 3:52:03 PM3/7/17
to Tasker
I've explored the magnetic field phone variable which gives a solution, but it is a little less straightforward than one would anticipate. The tricky thing is that when the phone changes orientation, the magnetic field variable seems to reset or zero itself out. So when the mod is first attached, the phone detects it from the magnetic filed variable in the proper range (>500). But while the mod is attached and the phone changes orientation, the magnetic field will drop to normal values <100. So unless the context trigger is a one shot type of trigger (or a kind of sustained Event type trigger), the phone will think that the mod has been detached when it is in reality still attached. Making the context a one shot type of trigger, or event, is fine, but it requires user input to let it know when the mod is actually detached... which still isn't full proof because if the mod is on, but the magnetic field value is low, once the mod is detached, the phone senses a large change in the magnetic field and gives another large (I'm assuming absolute) value... and that large value is what is used in the first place to detect the mod. Anyway, I have a working app that does what I want as far as automating settings when a Moto Mod is attached, but it would be nice to find another method to detect when a mod is attached and detached. Any other thoughts? Thanks in advance!

Rich D

unread,
Mar 7, 2017, 7:15:05 PM3/7/17
to Tasker Google Groups Post

 Any other thoughts? 

Judging by your description this will most likely not work, However you might be able to use it in some other form. 

If you can distinguish the difference between the start value and when  the mod is detached then you might be able to use what I refer to as a locking profile. It requires 2 profiles.  Tasker allows you to have profiles with the same name.  So if you make the fist  profile  



profile: Mod on

context : state /   Mod on value

Task: 

A1. Stop



and the second..


profile: Mod on

context: state / tasker / profile active : Mod on

context: state / mod off value (use the invert option)

enter task:

a1.  all enter task stuff


exit task:

a1. exit task stuff




The way it should work is when the mod on value is true then the first profile will go active and since (hopefully) the mod off value is not true then the second profile will go active. Now when orientation changes and the first profile  goes inactive the second profile will still be active (becouse there is a active profile called 'Mod on') This will stay active untill the mod off value goes true. 

Gal Ntwo

unread,
Mar 10, 2017, 1:23:21 PM3/10/17
to Tasker
But the tricky thing is how does Tasker know when the mod is attached or detached. I believe I understand your logic: essentially forcing an Event Context to act or behave more like a State Context. There many ways to implement such logic, and I think I have done so in a little bit different of a way, but using the magnetic field value as the trigger (either Event, or Event set up to act like a State) just isn't very robust. It works, but just not as smoothly and consistently as I'd like.

Maybe this project will be the one that pushes me over into the Android IDE/SDK environment in order to get this functionality more rubust. I imagine that using the Android App Development Tools would allow for detecting when the Moto Mod notification or broadcast intent (as a service or action(?)) is sent.

Rich D

unread,
Mar 11, 2017, 7:20:29 AM3/11/17
to Tasker Google Groups Post


But the tricky thing is how does Tasker know when the mod is attached or detached.

It was not clear to me if there were different values when attached or when detached. 



I believe I understand your logic: essentially forcing an Event Context to act or behave more like a State Context. There many ways to implement such logic, and I think I have done so in a little bit different of a way, but using the magnetic field value as the trigger (either Event, or Event set up to act like a State) just isn't very robust. It works, but just not as smoothly and consistently as I'd like.

It was a bit of a long shot from  the start.. :(



Maybe this project will be the one that pushes me over into the Android IDE/SDK environment in order to get this functionality more rubust. I imagine that using the Android App Development Tools would allow for detecting when the Moto Mod notification or broadcast intent (as a service or action(?)) is sent.

Judging from Pents comment tha sounds possible. 

Or, contact the developer of the mod software and ask for tasker plugin or at the very least a different type of intent that tasker can receive.   
Reply all
Reply to author
Forward
0 new messages