cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lorin Beer <lorin.beer....@gmail.com>
Subject Re: CommandProxy and misbehaving plugins
Date Tue, 29 Oct 2013 17:35:36 GMT
Hey Gord,

handling Vibrate behind the exec layer was attempted, but unfortunately
exec calls occur in a separate webview, and the call to vibrate isn't
executed.
We've talked about a few ways around this, and a jira ticket would be
appreciated.

- Lorin


On Tue, Oct 29, 2013 at 12:20 AM, Jesse <purplecabbage@gmail.com> wrote:

> Welcome back!
>
> Yeah, I chose to make windows8 run the exact same js as the other devices,
> and strove for a consistent exec signature. This was the initial goal of
> having a cordova-js in the first place.
> When I saw firefoxos requiring the same kind of functionality, I suggested
> they use the same classes, but we were in a hurry, so it was not refactored
> into the single module, although this was the plan.
>
> Incidentally, in 2.9.0 this WAS in it's own module, but it was refactored
> out so it only existed in the windows8 platform.[1]
>
> [1]
>
> https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=blob;f=lib/common/commandProxy.js;h=e6400038a918174ca02ea889cbe14b82750a8a2b;hb=83dc4bd9010447ea9b93889481516c64a9a46cde
>
>
> @purplecabbage
> risingj.com
>
>
> On Mon, Oct 28, 2013 at 9:09 PM, Gord Tanner <gtanner@gmail.com> wrote:
>
> > 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
> >
>

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