1

I wish to develop an app that automates tasks. For example suppose I want to automate a skype call to John Doe.

I have a bluetooth keyboard connected to an android device. When the user presses 'a' on the keyboard I want the android device to open skype, select user John Doe from contacts and make the skype call. When the user presses 'b' the skype call is terminated.

It seems like MonkeyRunner or uiautomator could perform these tasks, but it appears that a host computer with adb is required for these tools.

How can general ui tasks be automated?

monzie
  • 665
  • 1
  • 6
  • 12

1 Answers1

1

Automation can be done with an accessibility service. An accessibility service can receive events from any app with onAccessibilityEvent, and can send ui events to a widget with performAction

The user must manually enable the service in Settings->Accessibility->Services. The android ApiDemos sample TaskBackService demonstrates how an accessibility service is set up. The service must be declared in the manifest file with BIND_ACCESSIBILITY_SERVICE permission.

monzie
  • 665
  • 1
  • 6
  • 12
  • can you answer this question: https://stackoverflow.com/questions/49734263/click-on-the-notification-using-accessibility-service-programmatically – Siva Apr 09 '18 at 21:24