My project need accessibility feature, I need to enable programmatically. I am using below code snippet to make on.
Settings.Secure.putString(context.getContentResolver(),
Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
appInfo);
Settings.Secure.putString(context.getContentResolver(),
Settings.Secure.ACCESSIBILITY_ENABLED,
"1");
Settings.Secure.putString(context.getContentResolver(),
Settings.Secure.TOUCH_EXPLORATION_ENABLED,
"1");
Settings.Secure.putString(context.getContentResolver(),
"touch_exploration_granted_accessibility_services",
appInfo);
But it is not working does in a android device where 5.1 OS is available. In lower versions it works as expected. any changes in api after 4.0?