开发者

What is the easiest way to release an Android application for multiple OS versions?

I have written an Android application that I am about to release, but I would like to have a 2.1 version with multitouch and a lower API version without. However, if I simply just use the minSDK setting, the 1.6+ version would show up in the market with the 2.1 version on 2.1 phones.

Is there any way to release for a specific ran开发者_运维知识库ge of OS versions?

Thanks.


I would suggest having the application test to see if the multitouch API calls are available and use them if they are. If they aren't simply degrade gracefully.

Here is a good Google IO video on this you may not have seen: http://www.youtube.com/watch?v=zNmohaZYvPw


You can set both the minimum and the maximum API level in the manifest file with the uses-sdk tag:

<uses-sdk android:minSdkVersion="integer" 
          android:targetSdkVersion="integer"
          android:maxSdkVersion="integer" />


I second Guzba's post. I would highly recommend having one app that uses certain APIs depending on what OS version you have. There's also a good Android blog post about that: http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html

You basically check for the existence of certain classes or methods through reflection and use them if available.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜