Question

I am developing an app which uses the accessibility api in Android. I am having a bit of a problem while guiding the user to enable the service. The only thing I found so far is :

final Intent intent = new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivityForResult(intent, 0);
intent.addCategory(Intent.CATEGORY_DEFAULT);
startActivity(intent);

However this only takes us to the Accessability menu. I would like to automate the steps needed. At the moment, the steps to enable (after exiting my app) are :

  1. User is taken to settings
  2. User clicks on My accessibility service
  3. User clicks on the ON toggle
  4. User clicks on back button (to get back to main accessibility)
  5. User clicks on back button (to get back to the app)

I would like to reduce this so that I directly take him/her to the screen where he can see the accessibility toggle button

so it would be like

  1. User clicks on the ON toggle
  2. User clicks on back button (to get back to my app)

Any idea how I can do this directly, without going to the main accessibility service?

Was it helpful?

Solution

As far as I know you can only take them to the list of accessibility services. You cannot automate much of the accessibility stuff because of the implications it has. So you are automating it as far as you can.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top