[android-developers] Re: Backward compatibility when compiling.

2011-04-15 Thread sblantipodi

>
> "Don't fix it until is broken".
>

Ok, this is common but what is the real answer? :)
I would like to add this attribute to my manifest:
android:installLocation="preferExternal"
but this requires SDK Level 8 to build the source.

Isn't safe to compile using Level 8 SDK only for this attribute and
than
run my apps on Level 4?


> Obfuscation is not SDK dependant.
>

I mean that from SDK 2.3 proguard has been integrated into the into
the SDK, this could be really useful for a
netbeans user like me.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Backward compatibility when compiling.

2011-04-15 Thread sblantipodi
> Ok, so you got the real reason :) In this case you have to use higher SDK as
> I am not aware of any other trick you could use for Manifest to add new
> attribute and still be able to build against older SDK.
>

I have the real reason yes but if this reason will "damage" backward
compatibility
I will prefer to forget this real reason.

> If your code works fine now and the only thing you
> want to change is the Manifest as said, then you can do it without risk.

You are talking about obfuscation now or about compiling with SDK
Level 8 and maintain compatibility with Level 4?


> If you are going to switch to Eclipse

We have too many to do with Netbeans, I will not switch to eclipse
only for Android since I don't feel the necessityu :)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Backward compatibility when compiling.

2011-04-15 Thread MarcoAndroid
Since you want to use a new attribute that requires SDK level 8 or
higher, you will need to build against that SDK, older ones will give
a compile (invalid tag) error.

Then to make sure your app also still runs fine on 1.6 you need to
deploy it on a device with a level 4 SDK, or if not available, create
a 1.6 AVD and run it on that one.
The 1.6 runtime is just skipping the new attribute. I've read that
this is the behaviour recently for the xlargeScreens attribute, but
can't find it anymore :(

Should you be using Android Java API features that were introduced
after 1.6, then you need to make sure your code gracefully handles it
when those features are not present. See for a good explanation on how
to do this: 
http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html

HTH.

On 15 apr, 11:57, sblantipodi  wrote:
> > "Don't fix it until is broken".
>
> Ok, this is common but what is the real answer? :)
> I would like to add this attribute to my manifest:
> android:installLocation="preferExternal"
> but this requires SDK Level 8 to build the source.
>
> Isn't safe to compile using Level 8 SDK only for this attribute and
> than
> run my apps on Level 4?
>
> > Obfuscation is not SDK dependant.
>
> I mean that from SDK 2.3 proguard has been integrated into the into
> the SDK, this could be really useful for a
> netbeans user like me.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Backward compatibility when compiling.

2011-04-15 Thread sblantipodi
I'm talking about SDK now, at the moment I'm interested in adding this
attribute
but I want to be sure that I will not have any problems with android
1.6.

In the docs is written that previous version of android simply skip
the attribute,
but I just wanted to have a confirmation of people who tryed building
level 4 apps using level 8 SDK.

On Apr 15, 2:30 pm, Marcin Orlowski  wrote:
> On 15 April 2011 13:13, sblantipodi  wrote:
>
> > > Ok, so you got the real reason :) In this case you have to use higher SDK
> > as
> > > I am not aware of any other trick you could use for Manifest to add new
> > > attribute and still be able to build against older SDK.
>
> > I have the real reason yes but if this reason will "damage" backward
> > compatibility. I will prefer to forget this real reason.
>
> No it won't. At least I do not see the chance assuming you will to do what
> you wrote you plan only.
>
> You are talking about obfuscation now or about compiling with SDK
>
> > Level 8 and maintain compatibility with Level 4?
>
> Obfuscation got nothing to do with SDK level and got nothing to do with
> Android at all. It's matter of obfuscating *Java* bytecode. So if you target
> android you have to add ProGuard (or other obfuscator of choice) in your
> build (or rather publishing, to save time) process. ProGuard is not
> android-only tool, nor Eclipse dependant. You simply needs to hand it
> compiler output to chew and then hand its output further to produce dalvik
> compatible bytecode.
>
> Regards,
> Marcin Orlowski
>
> *Tray Agenda * - keep you daily schedule handy...
> *Date In Tray*  - current date at glance...
> WebnetMobile on *Facebook * and
> *Twitter
> *

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Backward compatibility when compiling.

2011-04-15 Thread Marcin Orlowski
On 15 April 2011 11:57, sblantipodi  wrote:


>  > "Don't fix it until is broken".
>
> Ok, this is common but what is the real answer? :)
> I would like to add this attribute to my manifest:
> android:installLocation="preferExternal"
> but this requires SDK Level 8 to build the source.
>

Ok, so you got the real reason :) In this case you have to use higher SDK as
I am not aware of any other trick you could use for Manifest to add new
attribute and still be able to build against older SDK.


> Isn't safe to compile using Level 8 SDK only for this attribute and
> than run my apps on Level 4?
>

It can be assume such. If your code works fine now and the only thing you
want to change is the Manifest as said, then you can do it without risk. If
you are going to switch to Eclipse, you may want to try API Analysis plugin
Kostya linked lately: http://code.google.com/p/adt-addons/ looks promising
and intended to help in such cases.

Regards,
Marcin Orlowski

*Tray Agenda * - keep you daily schedule handy...
*Date In Tray*  - current date at glance...
WebnetMobile on *Facebook * and
*Twitter
*

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Backward compatibility when compiling.

2011-04-15 Thread Marcin Orlowski
On 15 April 2011 13:13, sblantipodi  wrote:

> > Ok, so you got the real reason :) In this case you have to use higher SDK
> as
> > I am not aware of any other trick you could use for Manifest to add new
> > attribute and still be able to build against older SDK.
> >
>
> I have the real reason yes but if this reason will "damage" backward
> compatibility. I will prefer to forget this real reason.
>

No it won't. At least I do not see the chance assuming you will to do what
you wrote you plan only.

You are talking about obfuscation now or about compiling with SDK
> Level 8 and maintain compatibility with Level 4?
>

Obfuscation got nothing to do with SDK level and got nothing to do with
Android at all. It's matter of obfuscating *Java* bytecode. So if you target
android you have to add ProGuard (or other obfuscator of choice) in your
build (or rather publishing, to save time) process. ProGuard is not
android-only tool, nor Eclipse dependant. You simply needs to hand it
compiler output to chew and then hand its output further to produce dalvik
compatible bytecode.

Regards,
Marcin Orlowski

*Tray Agenda * - keep you daily schedule handy...
*Date In Tray*  - current date at glance...
WebnetMobile on *Facebook * and
*Twitter
*

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en