怎么判断安卓是否有无障碍模块?
怎么判断安卓是否有无障碍模块?一些安卓系统阉割了无障碍功能,请问怎么判断?没有方法可以判断 创世魂 发表于 2024-7-23 10:19
没有方法可以判断
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
public class AccessibilityUtils {
public static boolean isAccessibilitySettingsAvailable(Context context) {
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
PackageManager packageManager = context.getPackageManager();
ResolveInfo resolveInfo = packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
return resolveInfo != null;
}
}
这个可行?
页:
[1]