简体   繁体   English

使用Android Emulator测试触摸屏?

[英]Testing touchscreen with Android Emulator?

Is it possible to simulate or test Touchscreen input with the Android Emulator? 是否可以使用Android模拟器模拟或测试触摸屏输入?

I'm working on a project which needs to support touchscreen input, but I don't have an Android phone myself. 我正在开发一个需要支持触摸屏输入的项目,但我自己没有Android手机。 However if I could use my mouse to simulate/test touchscreen support in my app, it would be perfect. 但是,如果我可以使用鼠标在我的应用程序中模拟/测试触摸屏支持,那将是完美的。

Yes, you can implement the OnTouchListener and then on the emulator you can use your mouse. 是的,您可以实现OnTouchListener,然后在模拟器上可以使用鼠标。

A small tutorial here 这是一个小教程

http://www.mybringback.com/tutorial-series/3279/android-the-basics-32-androids-ontouchlistener-and-motionevent/ http://www.mybringback.com/tutorial-series/3279/android-the-basics-32-androids-ontouchlistener-and-motionevent/

It's theoreticaly possible. 这在理论上是可能的。 But to date multitouch support requires a real Android 4.0 device to send multitouch input to the emulator. 但到目前为止,多点触控支持需要一个真正的Android 4.0设备才能向模拟器发送多点触控输入。 However, in this case you don't need the emulator and can test directly on the physical device. 但是,在这种情况下,您不需要模拟器,可以直接在物理设备上进行测试。

You can read latest information about multitouch support here . 您可以在此处阅读有关多点触控支持的最新信息。

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

相关问题 在Android模拟器中以“飞机”模式进行测试 - Testing in “Airplane” mode in Android Emulator 在android模拟器中测试前进和后退 - Testing the forward and rewind in android emulator 测试录制和播放时 Android Studio 4 模拟器中的应用程序崩溃 - App crash in Android Studio 4 emulator while testing recording and play 使用observeOn(),Android UI线程崩溃了我的模拟器测试 - Using observeOn() the Android UI thread crashes my emulator testing 在没有模拟器的情况下对Android应用中的非Android特定代码进行单元测试 - Unit testing non-Android specific code in an Android app without emulator Android-JUnit测试模型/控制器(仅使用Java导入),而无需部署Android仿真器 - Android - JUnit testing Models/Controllers (which only use java imports) without the Android Emulator deploy Android 测试:我可以通过测试方法向仿真器号码发送短信吗? - Android Testing: Can I send sms to the emulator number from test method? Android:在模拟器上为没有Google Play服务的用户测试逻辑 - Android: testing logic for users who haven't got google play services, on an emulator 与Android模拟器配对磨损模拟器 - Pair Wear Emulator with Android Emulator 在模拟器上测试时应用程序崩溃 - App is crashing when testing it on an emulator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM