Android Question How to programatically click button on another app?

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.

https://stackoverflow.com/a/26687754

Could you please translate it to B4A?
 

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.
 

Syd Wright

Well-Known 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.
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:
Top