You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Joe Bowser <bo...@gmail.com> on 2014/11/20 20:41:36 UTC

Bridges as Plugins: MozillaView update

Hey

I've managed to get the old monolithic version of Mobile-Spec working with
MozillaView, and right now I'm running in to a serious problem with my
current approach to adding the GeckoView engine as a plugin, which is that
I had to re-write exec to get this to work with the bridge provided by
Mozilla.

Right now, I have the majority of the code pluginized here:
https://github.com/infil00p/cordova-mozillaview-engine

And this is based on this example project here:
https://github.com/infil00p/MozillaView

And requires this feature branch of Cordova JS to run:
https://github.com/infil00p/cordova-js/tree/mozillaview

What I'm thinking of doing is have plugin code that overrides the exec so
that it uses the new bridge instead of the old bridge.  Right now we only
have the bridge that Mozilla implemented working right now, and we don't
have the prompt mechanism implemented for BridgeSecret.  I also want to
revisit our method for encoding what comes out, since it seems weird that
we can't have base64 strings in JSON, since that's really how we're passing
Binary Data out of Cordova anyway.

I have to admit that the last part, getting the exec scripts to work has
been a huge slog in comparison to everything else.  Given that there's so
many people active in CordovaJS, you'd think this would be documented a lot
better than it currently is.  Right now I'm re-using the message encoding
that Android is using so that I can get this working and in front of people.

Anyway, thoughts on how to load exec as a plugin would definitely be
useful.  This is the main blocker for me getting this over the finish line.

Joe

Re: Bridges as Plugins: MozillaView update

Posted by Piotr Zalewa <pz...@mozilla.com>.
Thanks for that - I will take a closer look later on

Piotr

W dniu 20/11/2014 20:41, Joe Bowser pisze:
> Hey
>
> I've managed to get the old monolithic version of Mobile-Spec working with
> MozillaView, and right now I'm running in to a serious problem with my
> current approach to adding the GeckoView engine as a plugin, which is that
> I had to re-write exec to get this to work with the bridge provided by
> Mozilla.
>
> Right now, I have the majority of the code pluginized here:
> https://github.com/infil00p/cordova-mozillaview-engine
>
> And this is based on this example project here:
> https://github.com/infil00p/MozillaView
>
> And requires this feature branch of Cordova JS to run:
> https://github.com/infil00p/cordova-js/tree/mozillaview
>
> What I'm thinking of doing is have plugin code that overrides the exec so
> that it uses the new bridge instead of the old bridge.  Right now we only
> have the bridge that Mozilla implemented working right now, and we don't
> have the prompt mechanism implemented for BridgeSecret.  I also want to
> revisit our method for encoding what comes out, since it seems weird that
> we can't have base64 strings in JSON, since that's really how we're passing
> Binary Data out of Cordova anyway.
>
> I have to admit that the last part, getting the exec scripts to work has
> been a huge slog in comparison to everything else.  Given that there's so
> many people active in CordovaJS, you'd think this would be documented a lot
> better than it currently is.  Right now I'm re-using the message encoding
> that Android is using so that I can get this working and in front of people.
>
> Anyway, thoughts on how to load exec as a plugin would definitely be
> useful.  This is the main blocker for me getting this over the finish line.
>
> Joe
>

-- 
Piotr Zalewa
Mozilla

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org