1. Download our Official Android App: Forums for Android!

Performing Tasks in 3rd Party App

Discussion in 'Android Apps & Games' started by Gerald Schranz, Mar 16, 2016.

  1. Gerald Schranz

    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Mar 16, 2016

    Mar 16, 2016
    1
    0
    5
    Hello Folks!

    I'm already used to tasker and use it in simpler ways as shown in some examples and stuff.

    Now i'm wondering if it is able to perform tasks inside 3rd Party Apps in general?

    My idea would be to buy a mobile ticket via the app of the public transport company.
    So is tasker able to open an app -> klick here -> and then there and so on?

    thanks for answers
     

    Advertisement

  2. sumotori

    sumotori Member
    Rank:
    None
    Points:
    38
    Posts:
    57
    Joined:
    Feb 29, 2016

    Feb 29, 2016
    57
    22
    38
    Male
    Lay developer of Tasker apps in leisure time
    United Kingdom
    Hello Gerald and welcome to the forums. :)

    Yes it is very much possible.
    For the "click here" part you have two options.

    The first is if you have a rooted phone, then you can use the input command in a shell.
    It would be like: input tap X Y or input swipe X1 Y1 X2 Y2 and so on.
    You can find a guide for this here
    To find the co-ordinates needed, you need to enable developer options: Settings > About phone > And tap Build number 7 times.
    Then go back to Settings, on the very bottom you will see Developer Options, go in and find Show Touches/Show Pointer Location or similar.


    If you are not rooted and you don't want to be, then you can use the AutoInput plugin which you can find in Google Play.
    It has a 7-day trial for you to test. It has many more features, such as UI query etc to find elements.

    For the rest part, you need to use tasker to open the app, or test when the app is opened etc.
     
    #2 sumotori, Mar 16, 2016
    Last edited: Mar 16, 2016
  3. Thom

    Thom  
    VIP Member
    Rank:
     #22
    Points:
    1,318
    Posts:
    11,951
    Joined:
    Feb 16, 2011

    Feb 16, 2011
    11,951
    4,935
    1,318
    Male
    Software Developer
    Keene, NH USA
    I have not investigated that plug-in. It has un-rooted capabilities and root-ed only capabilities. Have you actually responded to a dialog using it on an un-root-ed device? Could you post a simple example?

    Thanks.

    ... Thom
     
  4. sumotori

    sumotori Member
    Rank:
    None
    Points:
    38
    Posts:
    57
    Joined:
    Feb 29, 2016

    Feb 29, 2016
    57
    22
    38
    Male
    Lay developer of Tasker apps in leisure time
    United Kingdom
    I haven't played around with the plugin much either.
    Indeed it does have additional capabilities for rooted devices, but the "tap" function is available for non-rooted device.
    I also think the same goes for the UI query functionality, i.e. that it doesn't need root.

    But the OP doesn't specifically mention response to a dialogue.
     
  5. Thom

    Thom  
    VIP Member
    Rank:
     #22
    Points:
    1,318
    Posts:
    11,951
    Joined:
    Feb 16, 2011

    Feb 16, 2011
    11,951
    4,935
    1,318
    Male
    Software Developer
    Keene, NH USA
    I got the plug-in. I was very happy to see that it supported the Back action in addition to the Home action. It was a very nice solution.

    My problem is that where I wanted to use it was in a Tasker Project that was Exported into an app and then used on a machine that had no Tasker installed.

    This app running on the machine that had Tasker ... the plug-in worked flawlessly. It also worked when executed inside Tasker.

    On the foreign machine the app put up a notice that it needed the plug-in and did I want to download/install it?

    So ... bottom line is that the plug-in has to exist on the machine the Tasker action is calling it. This makes it very useful for some people but not me.

    ... Thom
     
  6. sumotori

    sumotori Member
    Rank:
    None
    Points:
    38
    Posts:
    57
    Joined:
    Feb 29, 2016

    Feb 29, 2016
    57
    22
    38
    Male
    Lay developer of Tasker apps in leisure time
    United Kingdom
    I'm glad to hear you are liking it. I've been wanting to get it for a while, but I stop myself for the very exact reason you mentioned. I like to have my apps working out-of-the box or with free plug-ins that a user can install.

    But to my knowledge, this is the case for all the plug-ins that are used with Tasker.
    When you export an app that uses any additional plug-in, at the very bottom of the export options, right below the permissions needed, it has a part about the required plug-ins.
    There you can see what plugins your app is using and you can select whether you want the user to be notified of them being required (checkbox ticked) or not (checkbox empty).
     
  7. Thom

    Thom  
    VIP Member
    Rank:
     #22
    Points:
    1,318
    Posts:
    11,951
    Joined:
    Feb 16, 2011

    Feb 16, 2011
    11,951
    4,935
    1,318
    Male
    Software Developer
    Keene, NH USA
    Yes. And if it is unchecked the action provided by the plug-in simply doesn't do anything when triggered.

    Unfortunate.

    ... Thom
     
    sumotori likes this.

Share This Page

Loading...