Blog Post‎ > ‎

Mobile: Accessibility Service

posted Dec 9, 2015, 6:34 PM by Julian Zhu   [ updated May 17, 2016, 6:22 PM ]


Accessibility Services has been introduced to later version of Android OS. 

Accessibility is all about Convenience

Access right information at right time easily. 

Let's review a few key concepts of Accessibility:

Concept of Accessibility is Very Simple

Accessibility is about Event, Notification and Action. 

When something (Event) happens, mobile application is able to send you a Notification to alert you so that you could take further Action.

Accessibility is all about life: 
    • Wait for something to happen: Event
    • Know it when it happens: Notification
    • Do something about it: Action

Android Accessibility Service Makes Automation Possible and Easy

How does Android make it possible? 

Here are a few key Java components in Android framework you need to know: 

AccessibilityService

 This is the core component that provides you a framework to leverage the Android accessibility capabilities. You typically extend from this class to implement app logic to listen and respond to certain AccessibilityEvent. 

AccessibilityEvent

This defines types of events your app can listen and respond to. Examples are: when Android device receives notification, when window state changed, when window content changed, and so on ....

AccessibilityNodeInfo

This is node or component level information provided along with AccessibilityEvent. It provides information about what view component is associated with AccessibilityEvent when the event is detected. 

Beyond Accessibility is the Unlimited Sky 

Here is the challenge we often face when we try to create software to interact with a 3rd party app:

Unfortunately, no public API is published by the 3rd party.

I just want to mention that this Accessibility opens a totally new capability to address this challenge -- I have implemented proof-of-concept to demonstrate this capability. 

Since this is not Google's initial intention so I am not going to explain in detail here.

If you'd like to know more, feel free to contact me.