Reputation: 6297
So I`m about to write my first android app. I want it to be able to run on a handset but also on a tablet.
My question is, when I create an Android in Eclipse, which SDK should I choose? My initial thought is to write with 2.3.3 SDK. I imagine I should be able to run it on honeycomb as well, or I will have to write the same app but using the 3.0 SDK?
Upvotes: 1
Views: 360
Reputation: 4463
It all depends on the features that you want to utilize in your app. There are three settings that you can set in the application manifest after creating your app:
<uses-sdk android:minSdkVersion="integer"
android:targetSdkVersion="integer"
android:maxSdkVersion="integer" />
These allow you to control what OS version your app will be available on. A rule of thumb for now is that most apps are workable on future versions of the OS. For example, an app developed for 2.1 will work on 3.0, but you will not be able to utilize and 3.0-specific features in your app then.
Check out uses-sdk
Upvotes: 1
Reputation: 16060
Take a look at this statistics: http://developer.android.com/resources/dashboard/platform-versions.html
I would suggest to use version 2.2
Upvotes: 1
Reputation: 30825
If you use the android Support Package, you should be able to build against android versions all the way down to 1.6 and still support tablets. You can write a single application and support all devices from 1.6 and up (including tablets). I generally write applications that target 2.1, since that's the lowest version number that still has a significant market share. By using the Support Package, I can write a single application that is accessible by the vast majority of the android market and still works on the latest and greatest as well as uses some of the features that weren't introduced to the API until much later than 2.1.
Upvotes: 1
Reputation: 36302
I'd recommend that you target Android 2.1 unless you really need some API that is introduced in a newer version. This targets almost all users (tablet, etc. will be able to run it too). If you want to take advantage of the bigger screen of tablets in different layouts, you can use Fragments from the compatibility library.
Upvotes: 1