Skip to content
August 28, 2012 / fastr.de

Quicknode #5: WebView-MultiTouch-Polyfill v0.3 is out!

We released Version 0.3 of WMP.
Check it out on github. Or Download directly.

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.

Edit the Device Compatibilty Chart, file an Issue or comment here, mail me.

August 17, 2012 / fastr.de

Quicknode #4: Busy

Hello everyone,

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.

June 28, 2012 / fastr.de

Quicknode #3: Merging MTfix and WebView-Multitouch-Polyfill

In this Issue on google code  someone pointed me to Philzen github repository where he worked on exactly the same issue. So we try to “join forces” and develop together on a better solution.

 

June 15, 2012 / fastr.de

Quicknode #2: fastr.de MTfix Example App Download

I’ve uploaded an example app so you can test if MTfix works propertly on your device (and inform me  ;-p).
You have to enable “unknown sources” in settings -> applications to install the app.

June 15, 2012 / fastr.de

Example Video for fastr.de MTfix

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.

June 13, 2012 / fastr.de

fastr.de MTfix for Andoird 2.x Applications Version 0.1 released

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.
So I wrote an Android TouchListener class that captures the touches directly from the device and sends them via JavaScript to your webapplication and a JavaScript class that triggers TouchEvents when it recieved data from the TouchListener class.
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
  • you can do gesture detection in javascript because you get all touchstart, touchstop and touchmove events in the webview

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.
  • In the JavaScript file are to variables xMul and yMul to fix a touchdevice point to webpage point calculation issue. The values
    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)
    Email: strachanski@googlemail.com.
    or leave an comment.

Howto use the library: (I’ve tried to explain it completly, when you stuck feel free to contact me)

  1. Download the files
  2. Import the MTfixTouchListener.java file into your Android Application project.
  3. 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");
    
  4. Optional: call static function checkMTfix(<Your WebView>) to check if the javascript part is correctly implemented and ready.
    MTfixTouchListener.checkMTfix(wv)
    
  5. copy fastrMTfix.js to your webapp and include it in your HTML-Page
     <script src="pathToYourJavascript/fastrMTfix.js"></script>
     

That’s it!

What’s next:

  • 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.

 

Creative Commons License
fastr.de MTfix for Android 2.x Applications by Fabian Strachanski is licensed under a Creative Commons Attribution 3.0 Unported License.

June 2, 2012 / fastr.de

Android 2.x WebView(Browser) Multitouch Issue

I’m developing a map application and run into the problem, that my Android (2.3.3) Phone <update>doesn’t support multitouch events in  WebView Elements does not completly support multitouch events in WebView Elements, I can pinch-zoom but the touches are not send to the browser so the map is zoomed like an image and the map application doesn’t reload the maptiles for a more detailed view of the map</update>. This problem is described in an Issue on code.google.com and fixed in Android 3+. But I want to support devices lower then Android version 3 so i wrote a library that grabs the multitouch events sends it trough the Java-to-Javascript bridge and the Javascript part emulates the events in the browser.

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>

Follow

Get every new post delivered to your Inbox.