How to stay backwards and forwards compatible - targetSDKVersion, hdpi, minSDKVersion?

by Dianne Hackborn » Sat, 17 Apr 2010 06:32:37 GMT


Sponsored Links
 



Yes they will get them.  This specifies the minimum platform version the
resource is for.  (Note prior to 2.0 there was a bug where it was an exact
match, but that was fixed so you can count on -v4 and above working
correctly.)



It turns off the compatibility code for older applications that were not
written with 1.6 and later features in mind.  If you have tested against the
targetSdkVersion you have told the system you support, you will be fine.



You do if you want the system to run your app as well as possible on SDK 4
or later.



You can do that if you want.  It is up to you.  If you aren't using newer
APIs, it is not required.



targetSdkVersion should not impact that.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--



How to stay backwards and forwards compatible - targetSDKVersion, hdpi, minSDKVersion?

by Matt Kanninen » Sat, 17 Apr 2010 09:33:48 GMT


 


The worst bug I've had so far in Android development was an out of
memory that showed up when I used targetSdkVersion="X".  It took quite
awhile to figure out that was the culprit, and when I removed it I
didn't see any out of memory problems at all.  The problems showed up
on the Motorola Droid, late last year.   I spent a lot of time
optimizing my own memory usage to try and fix it, but removing
targetSdkVersion="X" worked best.

My 2 cents,
-MK

--


Sponsored Links


Other Threads

1. Do I need to worry about exploit used by one-click root apps

Hi,

I've read about different one-click root apps, for example
http://www.androidtapp.com/one-click-android-root-with-easy-root/,
that lets the user gain root privileges on an Android phone.

Do I need to worry about applications installed from Android Market
using the same exploit and compromising my phone? Is there a list of
combination of permissions apps that uses this exploit to elevate
themselves somewhere so I know what to look out for?

/Johan

-- 

2. Cant write on SD card thr applicatio

I was trying to create and write in a file on SD cards, but some time
i was not able to do it.
What I found that in Application menfest file,  uses permissions tag
has to be carefully placed as
per original structure of menifest file. Thr Eclipse IDE and its GUI ,
if you set the use permission
tag for allowing writing on external storage, it places it under
application tag, which i think should not be there.

code should be like this

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      ------------
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        --------

    </application>
    <uses-sdk android:minSdkVersion="4">

    <android:permission="android.permission.WRITE_EXTERNAL_STORAGE" />

</manifest>

Pl try as above and file writing on sdcard is possible

-- 

3. Notification text expand to two lines

4. Possible (and not possible) customization of the Tab component

5. RuntimeException retrieving resource

6. How to automatically restart widget update service after it is killed?

7. How to customize quick search box? can i add another button?