UiAutomator和AccessibilityServices不兼容吗? [英] Are UiAutomator and AccessibilityServices not compatible?

查看:369
本文介绍了UiAutomator和AccessibilityServices不兼容吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一个AccessibilityService(AS),以编程方式获取有关屏幕上当前显示内容的信息。

I have an AccessibilityService (AS) running to programatically get information about what's currently displayed on the screen.

现在,我想设置一些UiAutomator测试用例。但是,如果运行AS的UiAutomator给出以下错误:

Now I want to set some UiAutomator test cases. However, if I have the AS running the UiAutomator gives the following error:

INSTRUMENTATION_RESULT: shortMsg=java.lang.SecurityException

INSTRUMENTATION_RESULT: longMsg=Permission Denial: getIntentSender() from pid=9700, uid=2000, (need uid=1000) is not allowed to send as package android

我已经在网上搜索了,发现很多人遇到了这个问题,但没有解决方案。

I've searched the web and I've found that lots of people have encountered this problem but no solution for it.

那么这是否是缺乏兼容性的问题,还是有办法解决(或至少是解决方法)?

So is this a lack of compatibility issue or is there a way to solve it (or at least a work-around)?

注意:如果您对如何在不使用AS的情况下阅读/访问屏幕内容还有其他想法,我会不知所措(在这种情况下,您的眼睛会更多...),但是我对其他解决方案非常关注,这是唯一的解决方案我有一个。

Note: If you have other thoughts in how to read/access the contents of the screen without the AS I'm all ears (more eyes in this case...) but I've looked a lot for other solutions and this is the only one I got.

谢谢。

如果您需要更多信息,请告诉我。

If you need more information please tell me.

推荐答案

这是一个老问题,但是我已经我会回答自己说他们确实不兼容。

This is an old question but I've figured I'd answer myself saying that they are indeed incompatible.

这篇关于UiAutomator和AccessibilityServices不兼容吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆