Try the Demo or include it in your project!
It’s now easier to implement. Include .jar file in your Project and add one Line to your SourceCode!
Please test it on your Device and let us know if it works for you.
i’m still alive but i had a lot of work in the last weeks. Now i’m not so busy anymore and i hope i can actively develop WebView-Multitouch-Polyfill.
To explain the benefit of fastr.de MTfix a little bit better i’ve made a video that shows the released example application.
At first it shows the exampleApp without the MTfix, next with MTfix enabled.
The second app showed in the video is a map-application to demonstrate the difference between two finger pinchzoom without and with MTfix. Without MTfix only one finger is recognized by the map-application.
Version 0.1 of my MTfix classes to support multi-touch in WebViews on Android 2.x devices is ready.
The Browser/WebView Class in Android prior version 3 does not fully support multi-touch events.
You can find an video showing MTfix in action here and an example-app for you to Test here
What can this class do for you:
- recognizes more then one touch in your WebView
- pinch to zoom works
Limitations of this version:
- The Webapp has to be a fullscreen app (disable scrollbars!). When you scroll the touches are not at the right position anymore.
this.xMul = 1.03; this.yMul = 1.11;
are for my device. When you have to tweek these values please leave me a comment.
- Not widly tested yet. So when you use it please give me feedback.
Twitter: @fastr_de (i’m not writing tweets yet but read DMs and @fastr_de)
or leave an comment.
Howto use the library: (I’ve tried to explain it completly, when you stuck feel free to contact me)
- Download the files
- Import the MTfixTouchListener.java file into your Android Application project.
- Set the TouchListener of your WebView to a new instance of MTfixTouchListener
wv = new WebView(activity); wv.setOnTouchListener(new MTfixTouchListener(activity)); wv.loadUrl("http://www.YourMultitouchWebapp.org");
- copy fastrMTfix.js to your webapp and include it in your HTML-Page
- api level detection
- autodisable on Android >= version 3 (API 11)
- implement TouchEvents completly
- calculate pageX/Y, screenX/Y, clientX/Y correctly (should fix the “don’t scroll” limitation)
- test, test, test
- …? ideas?
It’s version 0.1 so it’s not ready. The TouchEvents are not fully implemented yet but it works perfect in my webapps.
fastr.de MTfix for Android 2.x Applications by Fabian Strachanski is licensed under a Creative Commons Attribution 3.0 Unported License.
I’m developing a map application and run into the problem, that my Android (2.3.3) Phone <update>
After some bugfixes i will release that library so you can also support multitouch in your Android apps with WebView integration.
You can test your device, Android Version and Browser combination on this page.
Here is the reason why you should support Andoird 2.x devices.
<update>MTfix version 0.1 is released</update>