AutoInput Kill App - No Root - Not working Correctly at Times

Discussion in 'AutoApps' started by Acadian, Feb 22, 2018.

  1. Acadian

    Acadian New Member

    Joined:
    Mar 29, 2017
    Messages:
    12
    Likes Received:
    0
    I'm posting new thread for this topic because other threads with the same topic did not provide any information to solve my problem. I coded the Kill App as explained in the video of the same name. The Kill App works fine the first time I use it. It Force Stops the "test app" and returns properly to Tasker. When I then use the Kill App to Force Stop "test app" after I've used "test app", "test app" is Force Stopped but Kill App does not return to Tasker. It appears that the Autoinput Global Action Back is not working. The incorrect behavior keeps occurring until I restart the phone. Once I restart, I get the correct behavior the first time I use Kill App to Force Stop "test app" but then get the incorrect behavior until I restart the phone. This incorrect behavior happens for all apps I try such as AccuWeather, MailDroid, Resound 3D, etc.

    I'm using a Pixel phone with Android 8.1.0. Any suggestions for fixing the problem are greatly appreciated.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Thanks for the report. What if you use the back action individually in a Test task? Does it also not work?
     
  3. Acadian

    Acadian New Member

    Joined:
    Mar 29, 2017
    Messages:
    12
    Likes Received:
    0
    I did not know how to implement your suggestion, i.e., how to get back to Tasker to run the Test task. However, I put a Flash message after the AutoInput Action to click the OK button after the Force Stop. The app never sent the Flash message which would suggest that the AutoInput to click the OK button never completed. Hope this helps. If not, how should I implement your original suggestion?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Mine was not actually a suggestion, just a test to see if the back action was working individually. :) Are you able to create a small test task just with the back action and see if that works?
     
  5. Acadian

    Acadian New Member

    Joined:
    Mar 29, 2017
    Messages:
    12
    Likes Received:
    0
    I creeated a test task with only the back action. When I run it, it returns to the Tasker task page.
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Ok, thanks :) So that is working at least.
    Can you please export your task's description (not xml) so I can take a look? Long-click the task in Tasker->export description Thanks in advance
     
  7. Acadian

    Acadian New Member

    Joined:
    Mar 29, 2017
    Messages:
    12
    Likes Received:
    0
    Here's my task description as you requested. I'm using the AccuWeather app as the test app.

    Kill Test (4)
    A1: Variable Set [ Name:%app To:AccuWeather Recurse Variables:Off Do Maths:Off Append:Off ]
    A2: Flash [ Text:Killing App %app Long:Off ]
    A3: AutoLaunch Query [ Configuration:App Nickname: %app
    Contains All App Nickname: true Timeout (Seconds):60 ]
    A4: Variable Set [ Name:%package To:%alpackages(1) Recurse Variables:Off Do Maths:Off Append:Off ]
    A5: AutoShare [ Configuration:App: Android
    Action: App Details Settings
    Data: package:%package Timeout (Seconds):10 ]
    A6: AutoInput Action [ Configuration:Type: Text
    Value: Force stop
    Action : Click Timeout (Seconds):20 ]
    A7: AutoInput Action [ Configuration:Type: Text
    Value: Ok
    Action : Click Timeout (Seconds):20 Continue Task After Error:On ]
    A8: AutoInput Global Action [ Configuration:Action: Back Timeout (Seconds):20 ]
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    CAn you please try adding a 1 second wait after A7 and before A8? Thanks in advance!
     
  9. Acadian

    Acadian New Member

    Joined:
    Mar 29, 2017
    Messages:
    12
    Likes Received:
    0
    Your suggestion did not work. The back action only caused the screen to scroll to the next app on the settings screen. Still did not get back to tasker.
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    What if you add another 1 seconds wait and another back action?
     
  11. Acadian

    Acadian New Member

    Joined:
    Mar 29, 2017
    Messages:
    12
    Likes Received:
    0
    The extra back action brought me back to the previous screen where the test app "force stop" is showing just like the beggining of kill test task.
     
  12. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Which is what you wanted, correct? Or am I misunderstanding?
     
  13. Acadian

    Acadian New Member

    Joined:
    Mar 29, 2017
    Messages:
    12
    Likes Received:
    0
    That is not what I wanted. I wanted to return to tasker since Test App is being run in tasker.
     
  14. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you keep adding back actions until that happens? :) Thanks
     
  15. Acadian

    Acadian New Member

    Joined:
    Mar 29, 2017
    Messages:
    12
    Likes Received:
    0
    I solved my problem by 1) calling the kill app from another app and removing the back action from the kill app, 2) adding a home action at the end of the calling app and 3) creating a widget for the calling app.

    Thanks for your invaluable assistance!!!
     
  16. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Awesome :D Glad it works now!
     

Share This Page