how to open Accessibility Settings of my app directly?

后端 未结 2 676
礼貌的吻别
礼貌的吻别 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条回答
  • 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

    0 讨论(0)
  • 2021-02-04 16:47

    Like so:

    Intent intent = new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS);
    startActivityForResult(intent, 0);
    
    0 讨论(0)
提交回复
热议问题