简体   繁体   English

如何模拟 android 设备抖动?

[英]How to simulate android devices shake?

I have a challenge that I need shaking android device 100 times in 10s, is there something like API or sending fake accelerator data to get it?我有一个挑战,我需要在 10 秒内摇动 android 设备 100 次,是否有类似 API 或发送假加速器数据来获取它?
In addition, I'm not sure if the application can recognize shaking at that high frequency.此外,我不确定应用程序是否可以识别出如此高的频率抖动。

You can use adb command to simulate device shaking like this:您可以使用 adb 命令来模拟设备抖动,如下所示:

adb shell input keyevent 82

But I don't know what do you mean by api with this question?但是我不知道您对这个问题所说的 api 是什么意思?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM