Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I start the Accessibility Settings Page of my APP in Android?

I am developing an Android APP based on Accessibility feature. As it can't programmatically Enable/Disable Accessibility Service in Android(See How to Programmatically Enable/Disable Accessibility Service in Android) , So I guide the user to Accessibility Settings Page(Pic 1) via the code below:

public static boolean gotoAccessibilitySettings(Context context) {     Intent settingsIntent = new Intent(             Settings.ACTION_ACCESSIBILITY_SETTINGS);     if (!(context instanceof Activity)) {         settingsIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);     }     boolean isOk = true;     try {         context.startActivity(settingsIntent);     } catch (ActivityNotFoundException e) {         isOk = false;     }     return isOk; } 

And then the user need to find out the Sub Settings Label of my APP, click it, and now the Accessibility Settings Page of my APP show(Pic 2).

I doubt that if any way start my APP's Accessibility Settings Page(Pic 2) directly?

like image 899
Kalok Lo Avatar asked Mar 31 '15 11:03

Kalok Lo


People also ask

How do I fix accessibility issues on Android?

Launch the "Settings" app from the All Apps screen, then choose "Accessibility." Make sure the options you require are all enabled. Select "Enhance Web Accessibility," for example, to allow Google websites to install browser scripts to aid accessibility.


1 Answers

You can manually open the accessibility settings with the following Intent (when android.content.Intent and android.app.Intent have both been imported):

Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS); startActivity(intent); 

Check out the following resources for more information:

  • https://android.googlesource.com/platform/development/+/master/samples/ApiDemos/src/com/example/android/apis/accessibility/ClockBackActivity.java
  • http://developer.android.com/reference/android/app/Activity.html
like image 65
Tim Groeneveld Avatar answered Oct 18 '22 02:10

Tim Groeneveld