Real Multitouch on Android

Tutorials with advanced 'difficulty' and more Lines of Code.

Real Multitouch on Android

Postby asimmittal » Mon Oct 10, 2011 9:20 am

I've been working on a project to make multi touch on android more like "microsoft surface". I've decided to go open source with this project now.

Here's a video of what I've made:


Here's a video of my talk at CMU mobile apps club regarding this project.


For more about the project, go to : http://asimmittal.net/multitouch_contest.html
asimmittal
Developer
Developer
 
Posts: 45
Joined: Wed Jan 19, 2011 8:35 am

Top

Re: Real Multitouch on Android

Postby wboe » Thu Oct 27, 2011 1:48 pm

Hello Asim,

Good from you that you addressed this multi-touch subject, complete with a nice explanation and source code. One issue I don't agree with however:
This is why there arent any applications on android that allow simultaneous transformation of multiple views in android using multi-touch

(from your pdf)

Actually it is quite possible to perform this: I did it for an app called OneHandSynth, which is an open-source project:
http://members.chello.nl/w.boeke/oh_synth/index.html
This contains an on-screen keyboard and many dials, and I wanted to use the keyboard and the dials at the same time. The trick is to use one toplevel ViewGroup, with as children all other views. At ACTION_DOWN or ACTION_POINTER_DOWN you find out what view contains the pointer coordinates, and you store that view's address and the pointer id in an array. During ACTION_MOVE, ACTION_UP and ACTION_POINTER_UP you use the stored address. The events are resent to the view using dispatchTouchEvent(e), after re-assigning the coordinates and the pointer type.

My solution is not very general (e.g. only one level of views), because I only implemented what I needed myself.

Regards,
wboe
wboe
Junior Developer
Junior Developer
 
Posts: 12
Joined: Sun May 08, 2011 8:45 am

Re: Real Multitouch on Android

Postby Openxcell » Sat Dec 17, 2011 7:16 am

Hello Assim,
Amazing information regarding the Mutli-Touch. Also thanks for providing the source code. It would help me a lot for creating and implement the skill on the application via these code.
Openxcell
Experienced Developer
Experienced Developer
 
Posts: 79
Joined: Mon Mar 28, 2011 1:59 pm

Re: Real Multitouch on Android

Postby asimmittal » Thu Dec 29, 2011 1:16 am

wboe wrote:Hello Asim,
The trick is to use one toplevel ViewGroup, with as children all other views. At ACTION_DOWN or ACTION_POINTER_DOWN you find out what view contains the pointer coordinates, and you store that view's address and the pointer id in an array. During ACTION_MOVE, ACTION_UP and ACTION_POINTER_UP you use the stored address.


What if the views were not fixed in position but moving around like in the sample i made? That would create a little problem too. More importantly, i take issue with the fact that the binding between secondary points and the view they are touching DOESN'T exist.

As a developer I shouldn't be wasting time figuring out how to navigate the view hierarchy in order to find out which view is being touched. I should be able to get that info from the framework.
asimmittal
Developer
Developer
 
Posts: 45
Joined: Wed Jan 19, 2011 8:35 am

Top

Return to Advanced Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests