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

0 votes

On the basis of the accessibility function, I am creating an Android application. Because the accessibility service in Android cannot be enabled or disabled programmatically, I use the following code to direct the user to the accessibility settings page:

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;
}

Then, after locating the Sub Settings Label of my APP and clicking it, the Accessibility Settings Page of my APP will appear (Pic 2).

Is it possible to open the Accessibility Settings Page for my APP (Pic 2) directly?

Nov 25, 2022 in Android by Edureka
• 13,620 points

edited Mar 4 1 view

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP