AutoInput AutoInput going Idle while waiting for UI State

Discussion in 'AutoApps' started by Ulas Developer, Sep 16, 2017.

  1. Ulas Developer

    Ulas Developer New Member

    Joined:
    Sep 16, 2017
    Messages:
    4
    Likes Received:
    0
    I have a tasker project that uses AutoInput to do UI State looking for 2 different conditions in two different apps, and has tasks linked that uses AutoInput to interact with the apps once one of those conditions is met. All 4 Profiles stay active the entire time the project is running.
    However, for up to 10-15 minutes at a time, Application #1 will stay idle on the screen, prompt me for input when needed, and then change to show new information. If it has been more than 5+ minutes or so, AutoInput doesn't recognize the UI State, even when I can visually see the conditions exist on the screen. If I go to the Home screen (using Nova Laucher )and then back to Application #1, AutoInput WILL recognize the UI State condition and fire the Profile and linked Task.
    I can't leave the phone at Home either, since Application #1 will shut down if it's not in the foreground for 3 minutes.
    This doesn't happen in Application #2 since its never the 'idle/waiting' application. When it prompts for user input, it brings itself to the forefront.
    Is there a way to tell AutoInput to refresh what it sees of the screen state? Something like a Profile that just checks screen state every 3 seconds if Application is in the foreground?
    Programmatically, I don't really need all 4 Profiles to be running looking for UI State either. I could turn them on and off as needed, but I've been using a condition variable that also runs as an AND in any of the profiles.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    What happens if you run an AutoInput UI Query action when that happens? Does that make it "refresh" the state? Thanks in advance!
     
  3. Ulas Developer

    Ulas Developer New Member

    Joined:
    Sep 16, 2017
    Messages:
    4
    Likes Received:
    0
    I haven't been able to try that yet, since any time I minimize the app that AutoInput has been watching to try something else, and then bring it back up, AutoInput then catches the UI State and fires the task. The other 3 of the 4 conditions I'm looking for work flawlessly, but they're also unlikely to sit in an idle app.
    Should I just have a loop that does a UI Query every 3 seconds as long as the app I'm working with is up?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Yeah, maybe you can try that :) Can you give it a shot?
     
  5. Ulas Developer

    Ulas Developer New Member

    Joined:
    Sep 16, 2017
    Messages:
    4
    Likes Received:
    0
    So! This did end up working partially, however, doing it on a looping basis (every 3 seconds while either of the three applications are in the foreground) started slowing the phone down, AND it would still occasionally still randomly stop, so I tried a different approach, and just had a Flash/Say notify me when I lost focus on any of those apps.

    Turns out, Nova Launcher is getting focus any time it displayed a Notification from any other app -- the bank, Amazon, Chamberlain MyQ, etc, and focus didn't return after the notification was done.

    Now, I'm playing around with AutoInput UI Update event for those apps and new tasks to inspire an AutoInput UI Query, but the UI Update seems to run the task over and over again while it's present, which might be ok but might still get the loss-of-focus issue mentioned above. I also tried AutoInput UI Input event for single clicks with a task that does a UI Query and flashes %aiapp, however, it's not catching all the clicks in the apps! Single taps on some sections of the app that goes through different pages are caught, but taps on maps and some other buttons do not trigger the UI Input event. I'll keep playing around and let you know what I find.

    Does running a generic AutoInput UI Query inspire any of the AutoInput UI State event conditions for the profiles?
     
: autoinput

Share This Page