Tasker and Moto Mods

canonBoy

Well-known member
Jul 13, 2010
236
0
0
Visit site
There's this post over in the Moto Z forum asking about tasker and Moto mods, specifically having tasker recognize when a mod has be attached/detached and then executing commands based on the connection.

https://forums.androidcentral.com/moto-z-force/739243-tasker-moto-mods.html

I've been doing some digging and have found bits and parts from the Moto mods developer site and the tasker literature
https://developer.motorola.com/explore/software/mod-management
https://tasker.dinglisch.net/userguide/en/intents.html

and 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.
 

kf6kmx

Well-known member
Jun 16, 2010
92
2
0
Visit site
There's this post over in the Moto Z forum asking about tasker and Moto mods, specifically having tasker recognize when a mod has be attached/detached and then executing commands based on the connection.

https://forums.androidcentral.com/moto-z-force/739243-tasker-moto-mods.html

I've been doing some digging and have found bits and parts from the Moto mods developer site and the tasker literature
https://developer.motorola.com/explore/software/mod-management
https://tasker.dinglisch.net/userguide/en/intents.html

and 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.
The original post was me :)
I use Tasker for a lot... Was hoping to find a way to get it to react to the projector and jbl speakers specifically.

I'll take a look at what you found and see if I can help make sense / headway. Tasker is so powerful, seems there must be some tweak that will work
 

canonBoy

Well-known member
Jul 13, 2010
236
0
0
Visit site
The original post was me :)
I use Tasker for a lot... Was hoping to find a way to get it to react to the projector and jbl speakers specifically.

I'll take a look at what you found and see if I can help make sense / headway. Tasker is so powerful, seems there must be some tweak that will work

I figure posting this in the Moto mod forum might get more traction than the Moto Z forum. Maybe someone in one of the two forums can shed some light.
 

canonBoy

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

Attachments

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

Mike Trieu

New member
Dec 15, 2012
2
0
0
Visit site
I've made and published an app that will automate various setting on your phone when you attach and detach a motomod to your phone!

What exactly are you detecting for that "Connection Sensitivity" setting? If you're detecting the electrical pins docking, shouldn't that just be a binary event? Are you relying on some external sensor somehow?
 

Slawomir Kowalski

New member
Mar 1, 2018
1
0
0
Visit site
I've changed mdkutility by simple adding send brocast intent after detection

Motorola GitHub sources

Code:
protected void onModAttach(boolean attach) {
        Intent sendIntentTasker = new Intent ();
        sendIntentTasker.setAction("whateve.yourname.MOD_CONNECTION");
        sendIntentTasker.putExtra(name:"data",attach);
        new Thread(new Runnable() {
            public void run() {
                updateModList();
            }
        }).start();
    }


After that you can create profile in Tasker Intent Reveiver and check %data -> true - Mods connected, false - disconnected.

I've tested it for some time and it works every time! Those app that tries detect magnetic field changes works almost like lottery...
 

Koneesha

New member
Apr 2, 2012
1
0
0
Visit site
I've changed mdkutility by simple adding send brocast intent after detection

Motorola GitHub sources

Code:
protected void onModAttach(boolean attach) {
        Intent sendIntentTasker = new Intent ();
        sendIntentTasker.setAction("whateve.yourname.MOD_CONNECTION");
        sendIntentTasker.putExtra(name:"data",attach);
        new Thread(new Runnable() {
            public void run() {
                updateModList();
            }
        }).start();
    }


After that you can create profile in Tasker Intent Reveiver and check %data -> true - Mods connected, false - disconnected.

I've tested it for some time and it works every time! Those app that tries detect magnetic field changes works almost like lottery...

How would I use this exactly? I just bought tasker and am brand new to it.

But what I am trying to do is set it up so that when I attach the battery mod and have the screen off the mod won't be charging the phone until the screen turns off.
 

Forum statistics

Threads
944,541
Messages
6,923,288
Members
3,159,611
Latest member
reheg