LightBlog

mardi 5 juin 2018

Android P now tells you when Accessibility Services stop working

Late last year, we discussed an email that Google was sending out to a number of Android application developers regarding how they were using Accessibility Services. When looking at Google's own documents for the feature, they explicitly state that it is to be used as a way to assist users with disabilities by providing user interface enhancements. However, we all know that some of the most innovative applications use it for all sorts of things. Applications that are granted permission for Accessibility Services can sometimes crash due to various bugs, and we have just discovered that Android P will actually tell us when something is not working correctly.


What is an Accessibility Service?

The Accessibility Service allows Android app to be more accessible to users with certain disabilities (such as those who are visually impaired). Now, this feature is commonly referred to as a11y and is an application that the system can feed certain information to depending on what events the Accessibility Service registers to listen for. So for example, an application that has been granted Accessibility Service permission can listen for TYPE_VIEW_CLICKED events which allows it to receive information from the system about any buttons that the user might press. The application can then take that data and do something else with it (such as remapping a button press in this case).


The emails that were sent out to developers were surprising because the previous version of Google's own documents didn't mention anything about Accessibility Services being used to assist users with disabilities. At the time, we were told that applications which were not fixed within 30 days would be removed from the Play Store and that has yet to happen. In any case, Google is still working to improve Accessibility Services with Android P as it will now tell you when the service is malfunctioning.

We found out about this change when we were testing an alpha version of XDA's new Navigation Controls application. There was a bug that caused the service to crash. Since this is something we've dealt with in the past we knew that we had to go into the settings application and toggle it off and back on. With Android Oreo and earlier though, the service would simply say that it was enabled and that caused many to assume there wasn't any problem with it. This isn't the case when an application has a bug like that and the service has to be enabled again.

With Android P, Google is now telling the user that something has gone wrong with Accessibility Services for a particular application. Instead of just saying "Enabled" like it used to, we are now told that it is not working and that we need to "Tap for info." In our case, when we tap on the application we are told that the service is malfunctioning. So it's good to see that Google is conveying some information to the user instead of leaving them guessing as to what is going on.



from xda-developers https://ift.tt/2xIgQNS
via IFTTT

Aucun commentaire:

Enregistrer un commentaire