You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Shazron <sh...@gmail.com> on 2012/08/11 00:46:19 UTC

Android version support level in Cordova 2.0.0?

This is a question from a dev using CDV 2.0.0

I believe we are only supporting Android 2.0 (api level 5), but he
asks how come there is some code that references Android 3.0 features?
Not an Android dev obviously, can someone enlighten me? Thanks!

Re: Android version support level in Cordova 2.0.0?

Posted by Simon MacDonald <si...@gmail.com>.
On Mon, Aug 13, 2012 at 12:16 PM, Joe Bowser <bo...@gmail.com> wrote:
> On Mon, Aug 13, 2012 at 7:12 AM, Andrew Grieve <ag...@chromium.org> wrote:
>> In my playing with Android, I've had some issues with this as well. Here's
>> what I've found:
>>
>>
>> In the template AndroidManifest, it specifies version level 8 (should this
>> be 7 then?):
>>
>
> It should be 7, picking 8 is really weird since it excludes Android 2.1

Fixed it and pushed change.

>> https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=bin/templates/project/AndroidManifest.xml;h=9e9abcdf9273a5d5c38c71481e8de71761c617e2;hb=HEAD#l60
>>
>> The framework AndroidManifest specifies version 2 (this should certainly
>> match the template's value):
>>
>> https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/AndroidManifest.xml;h=92f66f449b31fefd8edd969d1cc4bc363a5d709f;hb=HEAD#l67
>>
>
> This is very old, and most likely should be ignored. We don't support
> any Android versions below 2.1 and there would be some weird runtime
> errors if you were to run PhoneGap on a T-Mobile G1.

Fixed it and pushed change.

>> Once updating the value in the framework's manifest, Eclipse complains
>> about one of CordovaWebView's constructors calling a super-constructor that
>> is new in API version 11 (privateBrowsing).
>>
>> https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/CordovaWebView.java;h=f7f2be6f7bd87ed89abe44dc99dca9e2bbe4c384;hb=HEAD#l161
>>
>> Adding @TargetSdk(11) fixes this warning. Is that the correct fix though?
>>
>
> That is correct.  We don't care about that warning, since we always
> target the latest SDK, and older SDKs won't be running newer
> constructors.  We also assume that anyone who is turning on private
> browsing on a PhoneGap application knows what they're doing, and that
> since it's open source, and this requires source modification to do
> this, they get to keep both pieces. :)
>
> That being said, we make sure that CORE phonegap features work.  We
> can't vouch for plugins, and I find that we're on this constant
> slippery slope with plugins and other Java dev happening in the
> Android version that we should find ways to work around.

Agree 100% with Joe, always build with the latest SDK. It is an
involatile rule along the lines of "always bet on black".

Simon Mac Donald
http://hi.im/simonmacdonald

Re: Android version support level in Cordova 2.0.0?

Posted by Joe Bowser <bo...@gmail.com>.
On Mon, Aug 13, 2012 at 7:12 AM, Andrew Grieve <ag...@chromium.org> wrote:
> In my playing with Android, I've had some issues with this as well. Here's
> what I've found:
>
>
> In the template AndroidManifest, it specifies version level 8 (should this
> be 7 then?):
>

It should be 7, picking 8 is really weird since it excludes Android 2.1

> https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=bin/templates/project/AndroidManifest.xml;h=9e9abcdf9273a5d5c38c71481e8de71761c617e2;hb=HEAD#l60
>
> The framework AndroidManifest specifies version 2 (this should certainly
> match the template's value):
>
> https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/AndroidManifest.xml;h=92f66f449b31fefd8edd969d1cc4bc363a5d709f;hb=HEAD#l67
>

This is very old, and most likely should be ignored. We don't support
any Android versions below 2.1 and there would be some weird runtime
errors if you were to run PhoneGap on a T-Mobile G1.

> Once updating the value in the framework's manifest, Eclipse complains
> about one of CordovaWebView's constructors calling a super-constructor that
> is new in API version 11 (privateBrowsing).
>
> https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/CordovaWebView.java;h=f7f2be6f7bd87ed89abe44dc99dca9e2bbe4c384;hb=HEAD#l161
>
> Adding @TargetSdk(11) fixes this warning. Is that the correct fix though?
>

That is correct.  We don't care about that warning, since we always
target the latest SDK, and older SDKs won't be running newer
constructors.  We also assume that anyone who is turning on private
browsing on a PhoneGap application knows what they're doing, and that
since it's open source, and this requires source modification to do
this, they get to keep both pieces. :)

That being said, we make sure that CORE phonegap features work.  We
can't vouch for plugins, and I find that we're on this constant
slippery slope with plugins and other Java dev happening in the
Android version that we should find ways to work around.

Joe

Re: Android version support level in Cordova 2.0.0?

Posted by Andrew Grieve <ag...@chromium.org>.
In my playing with Android, I've had some issues with this as well. Here's
what I've found:


In the template AndroidManifest, it specifies version level 8 (should this
be 7 then?):

https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=bin/templates/project/AndroidManifest.xml;h=9e9abcdf9273a5d5c38c71481e8de71761c617e2;hb=HEAD#l60

The framework AndroidManifest specifies version 2 (this should certainly
match the template's value):

https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/AndroidManifest.xml;h=92f66f449b31fefd8edd969d1cc4bc363a5d709f;hb=HEAD#l67

Once updating the value in the framework's manifest, Eclipse complains
about one of CordovaWebView's constructors calling a super-constructor that
is new in API version 11 (privateBrowsing).

https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/CordovaWebView.java;h=f7f2be6f7bd87ed89abe44dc99dca9e2bbe4c384;hb=HEAD#l161

Adding @TargetSdk(11) fixes this warning. Is that the correct fix though?




On Sun, Aug 12, 2012 at 1:09 PM, Viras <vi...@users.sourceforge.net> wrote:

> It would be nice to somehow specify the supported API levels in the docs
> - wouldn't it?
>
> Maybe even dependent on each plugin, since if not all plugins are
> required it might be possible to support even lower API versions?
>
> Just an idea thought!
>
> Best,
> Wolfgang
>
> Am 11.08.2012 01:30, schrieb Shazron:
> > Thanks Simon! Ah ok - in 2.0.0 in the example/template manifests it
> > specified API level 5.
> >
> > On Fri, Aug 10, 2012 at 4:22 PM, Simon MacDonald
> > <si...@gmail.com> wrote:
> >> We support 2.1 (API level 7) and up. We make sure if we use an API call
> >> from a later release of Android that it isn't called on an OS that
> doesn't
> >> support it.
> >>
> >> Simon
> >> On Aug 10, 2012 6:47 PM, "Shazron" <sh...@gmail.com> wrote:
> >>
> >>> This is a question from a dev using CDV 2.0.0
> >>>
> >>> I believe we are only supporting Android 2.0 (api level 5), but he
> >>> asks how come there is some code that references Android 3.0 features?
> >>> Not an Android dev obviously, can someone enlighten me? Thanks!
> >>>
> >
>
>
> --
> GOFG - Get On Fat Guy
> http://www.gofg.at/ - powered by PhoneGap
>

Re: Android version support level in Cordova 2.0.0?

Posted by Viras <vi...@users.sourceforge.net>.
It would be nice to somehow specify the supported API levels in the docs
- wouldn't it?

Maybe even dependent on each plugin, since if not all plugins are
required it might be possible to support even lower API versions?

Just an idea thought!

Best,
Wolfgang

Am 11.08.2012 01:30, schrieb Shazron:
> Thanks Simon! Ah ok - in 2.0.0 in the example/template manifests it
> specified API level 5.
> 
> On Fri, Aug 10, 2012 at 4:22 PM, Simon MacDonald
> <si...@gmail.com> wrote:
>> We support 2.1 (API level 7) and up. We make sure if we use an API call
>> from a later release of Android that it isn't called on an OS that doesn't
>> support it.
>>
>> Simon
>> On Aug 10, 2012 6:47 PM, "Shazron" <sh...@gmail.com> wrote:
>>
>>> This is a question from a dev using CDV 2.0.0
>>>
>>> I believe we are only supporting Android 2.0 (api level 5), but he
>>> asks how come there is some code that references Android 3.0 features?
>>> Not an Android dev obviously, can someone enlighten me? Thanks!
>>>
> 


-- 
GOFG - Get On Fat Guy
http://www.gofg.at/ - powered by PhoneGap

Re: Android version support level in Cordova 2.0.0?

Posted by Shazron <sh...@gmail.com>.
Thanks Simon! Ah ok - in 2.0.0 in the example/template manifests it
specified API level 5.

On Fri, Aug 10, 2012 at 4:22 PM, Simon MacDonald
<si...@gmail.com> wrote:
> We support 2.1 (API level 7) and up. We make sure if we use an API call
> from a later release of Android that it isn't called on an OS that doesn't
> support it.
>
> Simon
> On Aug 10, 2012 6:47 PM, "Shazron" <sh...@gmail.com> wrote:
>
>> This is a question from a dev using CDV 2.0.0
>>
>> I believe we are only supporting Android 2.0 (api level 5), but he
>> asks how come there is some code that references Android 3.0 features?
>> Not an Android dev obviously, can someone enlighten me? Thanks!
>>

Re: Android version support level in Cordova 2.0.0?

Posted by Simon MacDonald <si...@gmail.com>.
We support 2.1 (API level 7) and up. We make sure if we use an API call
from a later release of Android that it isn't called on an OS that doesn't
support it.

Simon
On Aug 10, 2012 6:47 PM, "Shazron" <sh...@gmail.com> wrote:

> This is a question from a dev using CDV 2.0.0
>
> I believe we are only supporting Android 2.0 (api level 5), but he
> asks how come there is some code that references Android 3.0 features?
> Not an Android dev obviously, can someone enlighten me? Thanks!
>