0

I'm encountering an issue with the Accessibility Service in my Android app after users upgrade from an older version to a newer version. The Accessibility Service is intended to assist users with disabilities in accessing and using the app.

The problem manifests after the app upgrade, where the Accessibility Service seems to malfunction, and users are presented with error messages like "This app isn't working correctly. Turn it off above, then turn it on again, to restart it" on Samsung Tab A7 Lite and "This service is malfunctioning" on Micromax devices.

Restarting the device or manually restarting the Accessibility Service temporarily resolves the issue. However, as a developer, I'm seeking a programmatic solution to address this problem automatically, as restarting the service or the device should not be the expected behavior after an app update.

I've tried examining the update logic, but I couldn't find any specific issues related to the Accessibility Service in the codebase. I'm wondering if there are any additional steps I can take during the app upgrade to ensure the Accessibility Service works seamlessly without requiring manual intervention.

Is there a way to programmatically fix the Accessibility Service after an app update? Are there any specific considerations, best practices, or compatibility checks that I should incorporate into my codebase to prevent this issue from occurring in the future?

Any insights or guidance on resolving this matter programmatically would be greatly appreciated. Thank you!

The images can be found below ->

[[[enter image description here](https://i.stack.imgur.com/D51DJ.png)](https://i.stack.imgur.com/BpRsD.png)](https://i.stack.imgur.com/4HMvg.png)

Restarting the accessibility or Restarting the device itself fixed the issue. But I am looking for a programatic solution.

1 Answers1

0

A trick found on the stackoverflow site helped me in a similar situation. (I think it was in this question)

android:packageNames="@null"

in config xml file (then reassign in code).

Perhaps it will help you too.

siapost
  • 16
  • 3