Android Question How to programatically click button on another app?

Discussion in 'Android Questions' started by Inman, Mar 16, 2018.

  1. Inman

    Inman Well-Known Member Licensed User

    I am trying to build an app that can click a particular button on another app. This is possible from Android 4.3+ using findAccessibilityNodeInfosByViewId which is part of Accessibility service. For example there is a very popular app called Greenify on Play Store that prevents other apps from running in the background by clicking "Force Stop" button of each running app.

    Here is a code I found on Stackoverflow that explains how to do this.

    Could you please translate it to B4A?
  2. Erel

    Erel Administrator Staff Member Licensed User

    There is currently no library that implements the accessibility service. I don't think that it will be too difficult to create one.
  3. Inman

    Inman Well-Known Member Licensed User

    Thanks Erel. I hope someone with good Java knowledge will be kind enough to create a B4A library for Accessibility. The feature has been available for nearly 5 years on Android system.
    fredo likes this.
  4. Syd Wright

    Syd Wright Active Member Licensed User

    It would be wonderful if someone would create such a library (especially for the benefit of my blind clients in conjunction with my speaking and listening app).
    Maybe Don Manfred would be willing to give this a go (and ofcourse receive a Donation) :)
    Last edited: Mar 16, 2018
    fredo likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice