1. canonBoy's Avatar
    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/mo...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/explo...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 likes this.
    02-14-2017 10:42 PM
  2. kf6kmx's Avatar
    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/mo...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/explo...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
    02-14-2017 10:58 PM
  3. canonBoy's Avatar
    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.
    02-15-2017 08:27 AM
  4. canonBoy's Avatar
    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! Hit up the link and let me know how it works out for ya!

    https://play.google.com/store/apps/d...ps.automodsgen
    02-27-2017 10:01 PM
  5. canonBoy's Avatar
    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! Hit up the link and let me know how it works out for ya!

    https://play.google.com/store/apps/d...ps.automodsgen
    Attached Thumbnails Tasker and Moto Mods-43374.jpg  
    02-27-2017 10:03 PM
  6. canonBoy's Avatar
    I've just published an app specific to the projector and the JBL speaker mods!

    https://play.google.com/store/apps/d...s.automodsproj

    https://play.google.com/store/apps/d...ps.automodsjbl

    The general AutoMod is ideal if you only have one mod really, but if you happen to have the projector mod and the speaker mod, having the two apps will yield the best automation experience. I hope this helps!
    Attached Thumbnails Tasker and Moto Mods-43556.jpg  
    02-28-2017 08:08 PM
  7. canonBoy's Avatar
    JBL mod screen...
    Attached Thumbnails Tasker and Moto Mods-43558.jpg  
    02-28-2017 08:09 PM
  8. Mike Trieu's Avatar
    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?
    12-09-2017 03:45 AM
  9. canonBoy's Avatar
    The app detects the change in magnetic field. Hence the sensitivity setting in the general AutoMods app.
    12-09-2017 08:03 AM
  10. Slawomir Kowalski's Avatar
    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...
    03-01-2018 05:40 AM
  11. Koneesha's Avatar
    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.
    07-17-2018 09:00 PM

Similar Threads

  1. Moto Droid Maxx 2phone not found...
    By SonDan in forum Motorola Droid MAXX 2
    Replies: 2
    Last Post: 05-06-2017, 08:35 PM
  2. Moto Camera app
    By Mattsg430 in forum Moto Z Force
    Replies: 14
    Last Post: 03-01-2017, 06:31 PM
  3. Dual sim AND micro sd tray
    By okizen in forum Huawei Mate 9
    Replies: 0
    Last Post: 02-14-2017, 10:26 PM
  4. [Game][4.0+][Free]Square Rush - Press right color and run!
    By carrot0115 in forum Android Games
    Replies: 0
    Last Post: 02-14-2017, 09:49 PM
  5. Replies: 1
    Last Post: 02-14-2017, 06:46 PM
LINK TO POST COPIED TO CLIPBOARD