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. ListView issue (Editors?)

Hi all,

I would like to have a listview (or a spinner) that uses an EditText as it's 
view.  This appears to work well until I click on the editText and the soft 
keyboard is displayed.  What results is that the screen is now redisplayed 
using the remaining part of the screen but the focus always jumps to a field 
outside of the list view.

I assume from this, that whilst the keyboard is popping up, the listView has 
removed my EditText and then redisplays it after the keyboard has popped up and 
moved the focus.  Swing had the concept of "editor" cells which were always 
available to counteract this issue.

Is there a similar concept in Android?  Or is there a better way to do what I'm 
trying to do?

I appreciate your comments,

Peter Carpenter.

-- 

2. multiple instances of media player

Hi ,

I'm trying to play video in multiple media players simultaneously.
I'm successful in launching 3 media players continuously from gallery
app, but when i try to launch the 4th media player I'm revicieving the
following error message.


E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=134:PVPlayerEngine::HandleDecNodeQueryInterfaceOptional()
Tick=84235
E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=134:PVPlayerEngine::DoDatapathPrepare() for
X-MPEG4-AUDIO Tick=84235
E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=138:PVPlayerEngine::HandleDatapathPrepare()
for X-MPEG4-AUDIO Tick=84239
E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=139:PVPlayerEngine::HandleDecNodeQueryInterfaceOptional()
Tick=84240
E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=140:PVPlayerEngine::DoDatapathPrepare() for
X-H264-VIDEO Tick=84241
E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=142:PVPlayerEngine::HandleDatapathPrepare()
for X-H264-VIDEO Tick=84243
W/MediaPlayer( 1343): info/warning (1, 26)
I/MediaPlayer( 1343): Info (1,26)
E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=143:PVPlayerEngine::AddCommandToQueue()
Type=52 ID=6 APIcmd=0 Tick=84244
E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=143:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=143:PVMFMP4FFParserNode
- Time Taken in Read MP4 File  =0
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=144:PVMFMP4FFParserNode
- Read Media Sample Minimum Time  = 0
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=144:PVMFMP4FFParserNode
- Read Media Sample Maximum Time  = 0
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=144:PVMFMP4FFParserNode
- Read Media Sample Total Time  = 0
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=144:PVMFMP4FFParserNode
- Read Media Sample Avg Time  = 0
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=145:PVMFMP4FFParserNode
- Number of Sample Read each time  =4
E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=145:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=145:PVMFMP4FFParserNode
- Time Taken in Read MP4 File  =0
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=145:PVMFMP4FFParserNode
- Read Media Sample Minimum Time  = 0
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=145:PVMFMP4FFParserNode
- Read Media Sample Maximum Time  = 0
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=146:PVMFMP4FFParserNode
- Read Media Sample Total Time  = 0
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=146:PVMFMP4FFParserNode
- Read Media Sample Avg Time  = 0
E/PV      (  867): PVLOG:TID(0xa6728b90):Time=146:PVMFMP4FFParserNode
- Number of Sample Read each time  =1
E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=147:PVPlayerEngine::HandleDatapathReset()
for X-MPEG4-AUDIO Tick=84248
E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=150:PVPlayerEngine::HandleDatapathReset()
for X-H264-VIDEO Tick=84251
E/PV      (  867):
PVLOG:TID(0xa6728b90):Time=151:PVPlayerEngine::EngineCommandCompleted()
Type=24 ID=5 APIcmd=1 Tick=84252
E/PlayerDriver(  867): Command PLAYER_PREPARE completed with an error
or info PVMFErrResource
E/MediaPlayer( 1343): error (1, -17)
E/MediaPlayer( 1343): Error (1,-17)
D/VideoView( 1343): Error: 1,-17




Can anyone help me with this problem.





Regards,
Manju

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. PV Opencore call chain

4. Crash on gesture recognize

5. Smoothing out a line on a canvas.

6. glReadPixels() crashes on the HTC Desire

7. Urgent Help on Single instance of the activity