cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Clelland <iclell...@chromium.org>
Subject Re: Cordova Gesture plugin
Date Mon, 19 Aug 2013 02:25:54 GMT
On Sun, Aug 18, 2013 at 12:54 PM, Jonathan Bond-Caron <
jbondc@gdesolutions.com> wrote:

> I participated at a #hackmtl event in Montreal and thought it would be a
> good opportunity to try building a 'Cordova Gesture' plugin:
> https://github.com/jbondc/cordova-plugin-gesture


That looks really interesting as a project -- I'm excited about the
possibilty of standardising the idea of "gesture recognition" across
platforms.

My first time using 3.0.0 went very smoothly, the simple command line tools
> are great.
>
> Unfortunately I didn't complete the 'proof-of-concept' since I got stuck
> where the javascript plugin seems to load but fails:
> https://issues.apache.org/jira/browse/CB-4609


Is this preventing any plugins from working at all, or is it just something
about your new plugin?

The only thing that I can see that's a bit odd in your plugin is the
android-feature line in plugin.xml:

<param name="android-package" value="org.apache.cordova.core"/>

That value, I think, should end with the class that extends CordovaPlugin,
namely "Gesture".


>
> An important note for the plugin to be viable, 2 methods would need to be
> added to 'CordovaWebView':
> disableTouchEvents()
> registerGestureHandler()
>
>
I'm actually working on a patch that should make it easier for an
application to provide a custom WebView class that extends CordovaWebView,
but I'm not sure how feasible it is for plugins to do the same. We might
have to look at other ways of overriding methods like those (because I'm
sure that they won't be the last ones).


> The code works by intercepting the 'onTouchEvent', tries to detect a
> gesture and pass it directly to the DOM:
>
> https://github.com/jbondc/mtlhack-PhoneGap-gesture/blob/master/cordova/platforms/android/src/org/hackmtl/phonegap/gestures/TestWebView.java
>
> Feel free to fork away and provide feedback,
> Cheers, Jon
>
>
Ian

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message