50

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?

Ben Gotow
  • 14,805
  • 3
  • 42
  • 47
  • Just to add: I got my hands on a Nexus One, and it looks like you can only track two fingers using the current implementation. I only get 2 pointers, even if more fingers are on the screen. – Ben Gotow Jan 31 '10 at 19:48

4 Answers4

32

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

Daniel
  • 26,899
  • 12
  • 60
  • 88
  • 1
    Thanks djv - it doesn't look like they're providing too much information at this point, but that's a definitive NO, at least! – Ben Gotow Jan 18 '10 at 16:25
6

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

Paul Lammertsma
  • 37,593
  • 16
  • 136
  • 187
Waza_Be
  • 39,407
  • 49
  • 186
  • 260
4

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.
ddcruver
  • 911
  • 1
  • 7
  • 12
0

I think you should buy a new test phone.

But I only know that, only Nexus selled in Europe support Multitouch.

Hope others can make the emulator support this funcionality.

alex
  • 479,566
  • 201
  • 878
  • 984
Leox
  • 891
  • 2
  • 8
  • 8
  • 2
    I don't think that's the case about the Nexus. I think the Nexus supports multitouch and it's in the API, it's just that the built-in apps - such as the Browser and Google Maps - don't have mulitouch support. – David Webb Jan 18 '10 at 09:15
  • Dave is correct. Multitouch has been available in the API as of 2.0 (or 2.0.1?) and as such can be used on any device with that version of the OS. See the Dolphin browser for an example (albeit a horrible example) of multitouch that works on US versions of Motorola Droids and Nexus Ones. – Mark B Jan 18 '10 at 16:04