cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <...@adobe.com>
Subject Re: Determining if "you're in cordova"
Date Sat, 01 Dec 2012 00:04:44 GMT
It is to run a single codebase (or as close to it as possible minus the
differences in cordova.js) across web and cordova apps.

On 11/30/12 4:02 PM, "Jesse" <purplecabbage@gmail.com> wrote:

>Can we back up and discuss the goal?
>
>Is it to use the same code on the server + inside an app ( that is
>packaged for multiple platforms ) ?
>OR
>Is it to load an app on multiple devices all served by the same server?
>
>
>
>On Fri, Nov 30, 2012 at 3:56 PM, Shazron <shazron@gmail.com> wrote:
>> Its yucky and may break in a future platform version, but since each
>> platform requires its own cordova.js -- then each platform could define
>>its
>> own cordova.isWebView?
>>
>> wp7 is x-wmapp
>> iOS is file://
>> BB is http://localhost
>> Android is ?
>>
>>
>> On Fri, Nov 30, 2012 at 3:49 PM, Jesse <purplecabbage@gmail.com> wrote:
>>
>>> WP7 app is loaded from x-wmapp1:/
>>> WP8 app is loaded from x-wmapp0:/
>>>
>>> So file:// will not work
>>>
>>> There are probably numerous other approches ...
>>> deviceready will/should never fire, but that is difficult to test for,
>>> because it could just be taking a real long time.
>>>
>>>
>>> I see many issues with this though:
>>> - each platform still requires it's own cordova.js, so this would only
>>> work with 1 platform + a webserver, so no idea we come up for this
>>> will solve the bigger problem.
>>>
>>>
>>>
>>> On Fri, Nov 30, 2012 at 3:46 PM, Shazron <shazron@gmail.com> wrote:
>>> > document.location starts with http://localhost OR starts with file://
>>> then?
>>> > ;)
>>> > In any case, any js variable that we could set can be overridden of
>>> course.
>>> >
>>> >
>>> > On Fri, Nov 30, 2012 at 3:38 PM, Filip Maj <fil@adobe.com> wrote:
>>> >
>>> >> I think in BB WEbWorks you get http://localhost/somethingsoemthing
>>> >>
>>> >> On 11/30/12 3:35 PM, "Shazron" <shazron@gmail.com> wrote:
>>> >>
>>> >> >"how do we know if we're in cordova or not?" --> document.location
>>> starts
>>> >> >with file:// ?
>>> >>
>>> >>
>>>
>>>
>>>
>>> --
>>> @purplecabbage
>>> risingj.com
>>>
>
>
>
>-- 
>@purplecabbage
>risingj.com


Mime
View raw message