cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Bond-Caron <jbo...@gdesolutions.com>
Subject RE: Cordova Gesture plugin
Date Mon, 19 Aug 2013 14:58:26 GMT
On Sun Aug 18 10:25 PM, Ian Clelland wrote:
>
> 	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?

It seems like two issues in 3.0 release:
1) Issue with Windows path
2) Plugin loading works (cordova_plugins.js) but fails somewhere on Android with:
08-19 09:53:26.173: D/chromium(1708): Unknown chromium error: -6

As a first user experience, it would seem simpler if all the plugins were concat/bundled into
'cordova_plugins.js' 
e.g. cordova prepare android (would concat javascript into 'cordova_plugins.js')

The advanced use case(s) could support the dynamic loading of JavaScript plugins.

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

Thanks, fixed

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

That would be really useful, especially adding methods & properties to the webview.

For overriding methods, it adds some complexity that may not be worth it. 
If 2+ plugins override the same methods, there's potential plugin incompatibility.
It may reduce the reliability of 'core' cordova by causing odd bugs that are hard to track.

Maybe some specific parts of the webview could be extended / modified depending on what plugins
need to do.

Mime
View raw message