how to open Accessibility Settings of my app directly?

后端 未结 2 675
礼貌的吻别
礼貌的吻别 2021-02-04 16:20

As mentioned here: How can I start the Accessibility Settings Page of my APP in Android? I can open my app Accessibility Settings directly with this code:

Intent         


        
2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-04 16:40

    It work below kitkat 4.4 only. This vulnerability issue is resolve in 4.4 and above. Accessibility permission is one of the crucial permission and android not allow you to directly access that app page as of now there is only way to open Accessibility service is

    startActivity(new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS))
    

    And then user can choose your app if he want to allow permission

提交回复
热议问题