incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bowser <bows...@gmail.com>
Subject Re: [Android] DogFooding CordovaWebView
Date Tue, 26 Jun 2012 22:52:51 GMT
Remember the ctx variable that got renamed to cordova and how the
plugin broke? That's because early plugins used the fact that a
DroidGap was derived from a PhoneGapActivity, and a PhoneGapActivity
was derived from an Activity, and an Activity was derived from a
context.  Changing ctx back to a context and moving methods back into
the WebView allows us to make it possible to make a CordovaInterface
optional instead of mandatory, but makes it so that the
CordovaInterface must be a class derived from a Context, which isn't a
big deal since this is usually what it is anyway.

However, for some reason the CordovaInterface being able to not be a
Context was more important, and now we have to implement a handful of
methods when using it. It's hardly ideal, and hopefully we can work to
make things easier in the future so we can achieve both goals.

That's my 0.02.

Joe

On Tue, Jun 26, 2012 at 3:42 PM, Anis KADRI <anis.kadri@gmail.com> wrote:
> Can you elaborate on the "set plugins to just use contexts" part ?
>
> On Tue, Jun 26, 2012 at 3:38 PM, Joe Bowser <bowserj@gmail.com> wrote:
>
>> Yes.  That's why I want to get rid of as many methods in
>> CordovaInterface as possible.  It would have been better if we set
>> plugins to just use contexts, but for some reason we're not able to.
>> I don't know why this is.
>>
>> On Tue, Jun 26, 2012 at 3:36 PM, Anis KADRI <anis.kadri@gmail.com> wrote:
>> > I tried it out and it works.
>> >
>> > Correct me if I am wrong but in order to use CordovaWebView do you HAVE
>> TO
>> > implement CordovaInterface YAH ?
>> >
>> > On Tue, Jun 19, 2012 at 2:17 PM, Joe Bowser <bowserj@gmail.com> wrote:
>> >
>> >> Hey
>> >>
>> >> Since 1.9 has CordovaWebView, here's an example of an app using it.  I
>> took
>> >> the existing Android ActionBar example, and added the CordovaWebView to
>> >> it.  I found that there were too many methods that we're asking people
>> to
>> >> implement when we're doing this and we should find a way to reduce them
>> or
>> >> document their importance.
>> >>
>> >> Anyway, here's the example app:
>> >> https://github.com/infil00p/CordovaActionView
>> >>
>> >> Of course, we could plugin-ize some of this, but this at least gets rid
>> of
>> >> the issues that Wikipedia were running into regarding their mock
>> ActionBar.
>> >>
>> >> Any thoughts?
>> >>
>> >> Joe
>> >>
>>

Mime
View raw message