0

This question is quite similar to other.
However there is still no solution.
I am using the below code to jump to the accessibility settings page.

       Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
       startActivityForResult(intent, REQUEST_USAGE_SETTING);

Instead of jump to main accessibility settings page, i would like to take the user to the settings page of my app.

Alan Lin
  • 85
  • 1
  • 11

1 Answers1

0

for open setting page of your app you need to pass package name of your application as below, try this it will redirect you to setting page of your application

Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
                        Uri uri = Uri.fromParts("package", getPackageName(), null);
                        intent.setData(uri);
                        startActivityForResult(intent, 1);
YuvrajsinhJadeja
  • 1,383
  • 7
  • 23
  • I have tried the code, however it shows an error: No Activity found to handle Intent { act=android.settings.APPLICATION_DETAILS_SETTINGS dat=packagename:xxx.xxx.xxx.xxx } – Alan Lin Oct 02 '19 at 08:02
  • i tested it work perfactily show your code how you implement it @林振弘 – YuvrajsinhJadeja Oct 02 '19 at 09:13
  • Thanks! It work perfectly!! However I want to jump to accessibility settings page of my app instead of the detail settings page. – Alan Lin Oct 02 '19 at 11:34
  • 2
    My problem is jump to accessibility settings page of my app. However the code you provide do work perfectly to take user to detail setting page but not the accessibility settings page. – Alan Lin Oct 02 '19 at 12:33