如何以编程方式启用/禁用辅助服务在Android中方式、Android

2023-09-13 23:46:00 作者:南辞

我想以编程方式启用/下的设置 - >辅助功能选项中列出的禁用辅助服务。

I would like to programmatically enable/disable Accessibility Services listed under Settings->Accessibility option.

我可以开始辅助意向如下图所示:

I could start Accessibility Intent like below:

Intent intent = new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivityForResult(intent, 0);

但我没有就如何通过我的code能够在视图中列出的服务,任何想法。

But I don't have any idea on how to enable the services listed in the view through my code.

请,提供我的意见。

推荐答案

AccessibilityService是特殊的,不能以编程方式启动。

AccessibilityService is special and cannot be started programmatically.