-2

I am working an accessibility service app . All I want is to switch it off from a button click of the same app. How can I achieve this?

Saurav Mir
  • 124
  • 1
  • 11

1 Answers1

1

Unless the device is rooted, i doubt this is possible.

Anyways, you can open up the accessibility service page so that the user can turn it On/OFF.

Intent intent = new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivityForResult(intent, 0);
Prasad Pawar
  • 1,606
  • 1
  • 15
  • 30