Hey everyone,

Long time no commit but I was working on getting cordova 3.X support
working in ripple (really really close and about to release it) but I saw
some weird stuff in some of the plugins.

In the vibration plugin the base javascript calls into the cordova exec
module [1] and does all the work in the native layer, which is perfect.

BlackBerry 10 overrides the base javascript with their own implementation
that just delegates this to navigator.vibrate [2].  This isn't a unique
problem as firefox does the same thing but handles it behind the exec layer
[3].

It would be nice if we could keep each platform as close to being the same
as possible and diverge behind the exec layer (like firefox does).

I saw that windows8 and firefox both have a commandProxy that they use to
add in services and actions for the "native" layer.  I moved this to a
common plugin [4] (since it was duplicated anyway).

Now that this is a common plugin we can use it to override and add in
"native" modules so that BlackBerry and other platforms don't need to
diverge at the javascript API layer making it harder to emulate.


[1] -
https://github.com/apache/cordova-plugin-vibration/blob/master/www/vibration.js
[2] -
https://github.com/apache/cordova-plugin-vibration/blob/master/www/blackberry10/vibrate.js
[3] -
https://github.com/apache/cordova-plugin-vibration/blob/master/src/firefoxos/VibrationProxy.js
[4] -
https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=commitdiff;h=c6817556d90cc4e500c4f480b6e106b1b52d3002

Reply via email to