Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Multitouch - Possible to test in emulator?

I recently discovered that the Android 2.0 SDK supports multitouch through new functions in the MotionEvent class. You can specify a pointer index when retrieving touch properties, and in cases where multiple fingers are on the screen there should be multiple pointers provided.

Unfortunately, I only have a G1 to test on and it's running Android 1.5 and not 2.0.

Is there any way to test multitouch without a 2.0 device? In the iPhone simulator, you can hold down option and shift option to perform two fingered pinch and two fingered drag, respectively. Is there any similar functionality in the Android emulator? Is it something I should expect to see in the future, or should I just suck it up and buy a new test phone?

like image 552
Ben Gotow Avatar asked Jan 17 '10 21:01

Ben Gotow


People also ask

Can we test camera in emulator?

ICS emulator supports camera. I found Simple Android Photo Capture, which supports webcam in android emulator.

How do you test an app on an emulator?

Run your app on the emulatorIn the toolbar, select the AVD that you want to run your app on from the target device drop-down menu. Click Run. The emulator might take a minute or so to launch for the first time, but subsequent launches will use a snapshot and should launch faster.

Can Android Emulator be detected?

There is no official API in iOS or Android to detect an emulator. Therefore, several proprietary checks have to be done by the RASP system.


3 Answers

This is a post by a guy from the Android team who says that multitouch in the emulator is still not supported.

like image 173
Daniel Avatar answered Oct 16 '22 08:10

Daniel


This is a post that describes how to use multitouch from a tethered phone.

like image 39
Waza_Be Avatar answered Oct 16 '22 08:10

Waza_Be


Yeah I don't believe the emulator has that same shortcut that the iphone one.

In order to have true multi touch support for the emulator your Hardware must support it (HP TouchSmart .. etc.), your OS must support it (Windows 7 etc...) and Java must support it, and finally the emulator that Google provides in the SDK must support it.

So you would need to have specific hardware, the OS support is there but I don't believe java and emulator support is there.

I think you just need to get a 2.0 device. It seems like the most appropriate and cheapest solution is. Also the emulator really is not that great, to slow compared to an actually device especially on user input. All touch stuff should be developed and tested on an actual device. Use the emulator for automatic testing and layouts that are not supported by your physical test device.

Just giving you some justification in spending the money ;) but now 2.2 is coming soon so its hard getting one now and not knowing if it will be upgrade to 2.2 which is a big change.
like image 37
ddcruver Avatar answered Oct 16 '22 09:10

ddcruver