Should I use the latest 4.0 or 2.3? My phone has android 2.3.5 and it's a HTC Desire HD.
Does the runtime matter or will the applications work still?
First you should choose what device versions you'd like to target: http://developer.android.com/resources/dashboard/platform-versions.html
Based on those numbers it makes sense to currently support Android 2.1 and higher.
Also you should read about <uses-sdk> directive:
android:minSdkVersion and maxSdkVersion define the version range to which your app will be available. If device has Android version out of this range then app will not be visible for it.
targetSdkVersion is the vesrion that you are targeting and that you actually tested against. This attribute triggers Android's compatibility behavior: for instance targeting 2.3 will not show the new look on 4.0 devices.
I think this url will be helpful :
http://developer.android.com/resources/dashboard/platform-versions.html
All versions of android are backward compatible which means that an application designed to work with 2.0's api will work on 4.0 so it basically comes down to whats your target customers. there's still a vast majority that uses 2.x (unfortunately) so it is probably smart to develop for 2.1 and up..
but anyway this is a pretty common question and i'm sure google will produce a lot of useful information in the subject.
Related
I am a beginner on android programming. I am at the first at all. I wanna learn some important point.
Now, I am installing the programs and platforms which I need to develop Android Apps. On the SDK Manager there are few options to download Android API.
Which one should I prefer? I want to that, my app will run on all android roms and versions like ICS or JellyBean.
Thanks!
In order to support as many users as you can, you should opt for the lowest version API, since apps written for an older version of Android will work for future versions as well (although they may not be optimal). Once you need a feature in a later version, you can increment your minimum SDK version.
I would look through the different SDK versions (e.g. 2.1) and see which features (and/or permissions) you need for your app.
Keep in mind that older phones may not have certain capabilities, and you may not be able to support them. Therefore you should weigh if what you're adding is worth alienating the users you will no longer be able to support. Android provides a table of market share per version.
You mention that you want to support ICS (4.0) and Jellybean (4.1 and 4.2), which together control a little less than 50% of the Android market. It is worth looking into supporting Gingerbread (2.3) as well for another 45%.
Another option of course is to branch your code depending on the user's OS version, but this requires a little more maintenance work. However, if you are supporting pre- and post-Holo-themed versions (ie for the action bar), it may not add that much overhead.
It really depends on your target market, purpose, and familiarity with Android.
Android maintains forward-compatibility which means an app designed for 2.1 for example will work on later versions (in most cases). However there are some features added in later versions which are only supported starting with a certain SDK version.
This page may be helpful for you
Android version 2.3 - 2.3.2 (API 9) are declared as obsolete, and according to Android Market statistics, are very rare (0.5% of market users).
The question is:
Why is API 9 declared obsolete and more importantly, is there any reason why should I not use it? I've been using API 9 and see no problems with it... am I missing something?
Better not fix it if it's not broken, right?
EDIT:
Clarification:
If I would update my applications' API from 9 to 10, what would be the benefits?
I can only see negative effects:
1% of users will suddenly find out that the app doesn't work on their phones any longer. This is even worse with paid apps. Or that I'd be forced to maintain two versions of each app.
Have a look at the description of API levels. Gingerbread API (9) has been replaced by Gingerbread MR1 (10). You should upgrade to this API.
The current version of the android OS is 4.0 (Ice Cream Sandwich). 2.3/2.3.2 is quite a few versions ago and was quickly replaced by 2.3.3. (api lvl 10), so it is very reasonable (as time progresses and changes / updates are introduced) to "shelve" a specific version so to speak.
However, the one strength in the android OS is backwards compatibility. While older devices (pre 2.3) will not be able to run your applications, all applications going forward will. There is technically no problem running the older OS's but bug fixes/changes...etc mean you may be inadvertently using buggy code that contains security flaws or other issues.
It's best to pick the API version that will reach the majority of your target market most effectively.
For example, if you wanted to take advantage of some screaming new OpenGL features on the newer higher powered phone you wouldn't want to run it an older API level and possibly create a storm of angry users because their phone doesn't have the HP to run it!
However a more simple application might be fine just running on an older OS (like the Chuck Norris random fact generator).
You should always go for the lowest possible API to use. Simply because the lower your API level is, the more users can you reach.
So looking at the current stats, you are able to reach 97.9% if you "dumb" yourself down to API level 7.
But why API level 9 is obsolete? One could not know for sure, but most likely because it had some major flaws.
The Lvl9 is obsolete because if you want to develop for Gingerbread you should use 2.3.3+ (Lvl 10). This is because the "old Gingerbread" (lvl 9) has some significant issues.
Well, I don't really think you should be worry about the OS itself. But many Droid programers, like myself, are not testing Gingerbread version on emulators. Mostly, because it's not showing on the SDK interface (appears only when you check the obsolete filter). So, I guess that other programers are ignoring this version also. That's the only problem I can think.
I'm starting to broad my developer skills also to the Android development.
I installed all the tools and configurations and every thing seem great, As a default settings I install the 3.2 SDK, but there is not too much docs on that one, mode of what is out there is on the 2.x SDKs.
Is it like IOS, does android have a good backward computability? Can I stay with the 3.x and count on it (with the features that are in the 2.x SDKs) to work on 2.x phones? What are the common version in the Android devices this days? I have lots of newbie develop questions like that, as i want to start from a good starting point and there are lots of materials and tutorials over the web that are not up to date.
Also, does any one know about a good site for this kind of Q&A?
Thank you,
Erez
As of July 5th the version with the largest market share (59.4%) is 2.2 (API Level 8) as shown here
http://developer.android.com/resources/dashboard/platform-versions.html so Consequently I would recommend using that as a starting point unless you are solely focusing on the new honeycomb tablets (<1% market share).
As for backward compatibility, android is completely backward compatible for the most part. Unless of course you use a new feature that is only available starting with a certain API level. Google's Android market is good about only allowing apps that will run on a certain API being visible to that phones user. This is enforced by the API level as recorded in the manifest file that is created with every Android app and set by the developer.
To help you with the API level, the SDK docs show what API a feature/object started with in the upper left hand corner. You can also view the specific changes in each platform and it's corresponding API level at http://developer.android.com/sdk/index.html.
As for a good website to get started I would recommend the developer site at developer.android.com and this website of course. Also the book Android Wireless Application Development by Shane Conder and Lauren Darcey (2 ed) Is very good. (I am not connected with the book just currently reading it). Make sure you get the latest edition.
Hope this helps,
George
Above is good info, but it would be advisable to develop for 2.1 and up at the moment, considering as of this answer's writing, 2.1 makes up 17.5% of the market and 2.2 makes up 59.4% of the market.
http://developer.android.com/resources/dashboard/platform-versions.html
OP should also be advised that version 3.x is specifically for tablets, so that may not be the best choice for a starting developer. My advice is to go with 2.1. Most of the documentation is up to date with that, and you won't have access to things you don't need yet (fragments, tablet-specific things)
Hope this helps!
You can read about application forward and backward compatibility in the docs.
Generally apps are forwards compatible but not backward compatible - new APIs introduced in one version are not available in an older version.
This pie chart shows distribution of devices accessing the Android Market and based on this I would try to target devices using 2.1 or newer to cover most of your users.
Your decision should be based on whether you need a feature introduced in a specific version. For example, if you want to add NFC to your app, you'll need Android 2.3.3 or newer, but otherwise there's no reason to exclude older devices.
I recommend learning about Fragments and using the compatibility package to use them on targets below 3.0. This will make it easier to reuse view elements on both tablet and phone devices. Note that if you only intend to develop for phones, 2.3.4 is the latest phone version of Android at the time of writing. Later this year, 3.0 for tablets will merge with the phone version to provide a unified OS version as with iOS.
Android 3.2 is just released publicly on friday, July 15th. You can start-off with Android 2.3.3 and 3.2 installation and development.
Android applications are mostly forward compatible. (But not always)
The best place to find all your answers is developer.android.com
For testing purposes I need to buy an android device. Can I get a tablet device with android 3.1 honeycomb and use this to test apps developed on older android versions? Are new android versions backward compatible with older apps?
Not entirely. In many cases yes, but there are exceptions:
There have been some api changes, and more importantly, there are a lot of apps out there which did things that weren't entirely proper, but worked on the devices they were developed for.
Some older apps were written to use input devices not present on recent phones or tablets - hardware trackballs or dpads, buttons, etc.
Also no small number of older apps will display in a phone-sized area leaving the rest of the tablet screen blank.
Unfortunately, the flip side of the vendor customizability of android is that if you really want to do comprehensive testing you need access to a variety of devices, even for a single api version.
Can I get a tablet device with android 3.1 honeycomb and use this to test apps developed on older android versions?
Yes.
Are new android verions backward compatible with older apps?
Yes.
Back version is compatible with android 3.1 but only simple application means without any animation (Like Games) and some special features etc.
I'm a CS student and with my team we're going to realize an android application for our Software Engineering course. We're not Android developers and we using this opportunity to learn how to do it.
We know it's available the 3.0 version but that basically has tablets as target. Our target is smartphones, so the question is: should we stick with 2.3 or should we use 3.0 API.
I know the natural answer would be "2.3" but it's not really clear to us where "3.0" is going.
I would even go for 2.1 or 2.2 - 60% of the market uses 2.2, 20% 2.1 and 6% 2.3.
3.0 is atm only available for tablets - targeting this will limit your target market a lot, as no mobile handsets will have 3.0 any time soon.
See also this q&a: What version of Android should I develop for?
3.0 is the future, no doubt. But 3.0 is currently just available for some tablets. Almost all smartphones are currently using some 2.x version.
As you can see here, the version 2.1 and above are widely used. So I personally would target 2.1 and above.
Depends on your application's scope.
If you want to aim at as many people as possible, you should go for 2.1, or 2.2, if you don't use any specificity from the 2.3 SDK (NFC for example).
It is important to know that, because only about 10% of Android phones are running 2.3 (and even less I think). More than 70% have 2.1 or superior, so if your target is mass distribution, 2.1 would be nice. (You can develop an app under 2.3 SDK aiming at lower version as well, just add it in the manifest)
Otherwise, if your application is tablet-aimed, use 3.0. Otherwise go for 2.3.