Which Android platform and API to target? - android

I'm just about to launch my first Android app, and it runs on the Android 1.1 platform, API Level 2, but is this what I should officially sign and launch the app as? Does it affect performance at all or is it simply for Android to know which devices it works on?
The only problem I see is that I can't specify <supports-screens> in the Manifest, which I would like to do, but it appears I'd have to launch at 1.6 at least for this to work.
Would I be missing a huge number of phones by launching at 1.6 instead of 1.1?
Thank you!

Removing out of date info and info that I'm sure will be out of date in the near future. Just go here to see what versions you should care about:
http://developer.android.com/resources/dashboard/platform-versions.html

I'd say 1.5 is a good choice for now. Have a look at the chart here: http://android-developers.blogspot.com/2009/12/knowing-is-half-battle.html

Recent update of the Android fragmentation from Android Tapp:
Android fragmentation http://www.androidtapp.com/wp-content/uploads/2010/05/Finally-More-Users-on-Android-2.1-but-Android-Still-Fragmented-Chart.jpg

As far as I am concerned, I start developing targeting 1.5. When half finished, I would switch to 2.1 and when finished, I would try all versions in-between. I do not regard it necessary to mind any version lower 1.5 ... you cannot be downward compatible to the beginning of the universe ;-)

Strategies for Legacy Applications
http://developer.android.com/guide/practices/screens_support.html#strategies

Related

Developer wants to build in version 4.0.x and 4.1

I've got a quote from a developer to build a couple of Android apps. For both the contract states: "App will be compatible with Android OS 4.0.x and 4.1".
Can anyone please tell whether this poses any problems for people wanting to run the apps on newer versions of Android's OS? Not sure if I should be worried or not.
Many thanks
Drew
Mostly, newer Android API fully support older API. That means anything that works on 4.1 should work on 4.3, 4.4, etc
Still, not everything that can run on 4.1 can run on 2.2, for example. Backwards compactibility is a huge problem sometimes
Targeting a minimum of 4.0 won't stop the apps from working on the current versions of android. The only major difference that I can think of is the default color accents being changed in 4.4 (The current highest release). This can be addressed by your developer if your desired styling overrides the defaults anyways, otherwise know that in 4.0 youll see lots of blues, but in 4.4+ youll see a more subtle grey accent.
That isn't to say that this will always be the case though. At any point the OS can take a right turn like they did with the HOLO changes that were introduced between 2.3 and 3.0, which would make your "legacy" app not function as it use to. At this point, you would either have to have the app redone, or accept the flaws in this completely hypothetical future state.
Unless the API is depecrated, they will always work on newer versions. The problem usually is older versions unable to support newer API, not the other way round.

How to decide what will be the target android version?

I'm new in the android developing.
I need to write some simple application - and i need to decide what will be the target version.
I don't know how to decide this - because i want to support the most newer version with all the new abilities - but i also want to support the maximum devices ( there are few devices that have old versions )
So, How to decide what will be the target version ?
In the Android Manifest.
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
Set your android:targetSdkVersion to whatever is the last Android SDK version.
Quote from Bruno Oliveira at Google IO:
targetSdkVersion does not affect the minimum SDK level required to run your application. It should always be the latest version that you are aware of.
The only reason you could have to use a lower version would be to detect incompatibilities, but that is not a good reason because Lint does this better.
BUT set your android:minSdkVersion to as low as your app will run on. That's the important one.
For instance, my app uses very new features, but I set android:minSdkVersion to 3 (which means Android 1.5). My code detects Android 1.5 devices, and uses less-shiny controls on them, but still runs correctly.
Detection code sample:
if (android.os.Build.VERSION.SDK_INT > 4) {
ActivityTransitionAnimation.slide(this, ActivityTransitionAnimation.UP);
}
So, here is my suggestion:
Set android:minSdkVersion to 3
Everytime you discover an API is not present at that level, ponder whether the loss of potential users associated with increasing this number is worse than spending the time to implement a workaround.
I would say just start off with the lowest possible target and then as you encounter stuff that you can only do with a higher target you will have to change the target to the higher one. Using APIs that only work on for example 2.3 will show errors if your target is lower (because the APIs won't exist there).
Also you should consider the current state of the "fragmentation" to se what targets are actually being used out there. Looking at this chart (from October 5) maybe it could be worth just starting with 2.1 and se if it is high enough for all the things you want to do:
http://cdn.devilsworkshop.org/files/2011/09/android-OS-fragmentation-report.jpg

Android dalvik problem

Please i have different platforms installed. I just wanted to know what am supposed to do. If i develop with 3.0 platform, would those with a 2.2 be able to use my app??..
The second question which is the main question is I always get this error when i create android projects..
[2011-05-16 16:32:21 - Hello World] Dx no classfiles specified
[2011-05-16 16:32:21 - Hello World] Conversion to Dalvik format failed with error 1
What do I do to it?
There are several reports out there for that error (e.g., this one. All the solutions point simply to reload the project (select it in the tree at your left, and press F5).
Regarding the first question, unless you want to support Honeycomb-only features, then set up the api level to 8 (Froyo).
Eclair, Froyo and Gingerbread are android versions 2.1, 2.2 and 2.3 respectively (also referred in the documentation as API levels 7, 8 and 9). See the table here. If you want to support just mobile phones, set your target to 2.1 or even lower. That way you will be able to target most of the phones in the market. Your app will also run in Honeycomb (3.x) devices.
Honeycomb has new features to support larger screen devices, so if that is your main target, you might consider taking advantage of those features and drop cell phone support. All will depend on what is your objective.
you should have a look at the minSdk and targetSdk features of a manifest file :
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="8" />
This will help you target a android sdk version and precise what is the minimum sdk level that can run your app.
Regards,
Steff
Developing for Honeycomb or non-tablet version of Android, is different in various things. Your 2.2 application should run correctly on a tablet, but if you want to optimize the graphical interface and use all the notification and other things included only in Honeycomb, then you must use the appropriate API. Until Ice Cream Sandwich is released, we have to develope two different application for the best result.
Regarding the error you get with android projects (I suppose under eclipse?) you'll find some detail at this link, but if you follow all the instruction provided by google in the developers page, you'll be able to write and run your Hello World application.

Android: For all practical purposes, which api version should I be targeting

Title says it mostly...
While it would be nice to be able to cover 90%+ of devices in use now, if it starts to complicate things, I think, focusing on devices being released now and soon clearly has priority.
Bonus points, on guidelines to set project settings and emulator to be in sync and without warnings.
See the Android Dashboard for stats on API usage and trends: http://developer.android.com/resources/dashboard/platform-versions.html
(As of May 2011, it looks like targeting 2.1 and 2.2 covers about 90%, but obviously this will change.)

android device compatibility

i don't know it is right place to ask question in stackoverflow .but i fell its best place to get quick answer for my query.
for getting more downloads i developed my application in android 1.5 version,minSDK 3. if i place application into android market.it will visible 1.5 and higher version mobile android market.it is good way for develop application in 1.5.how to make application good ui for all screen resolution
Thanks in Advance
Aswan
I am not 100% sure what your question is. But if you are asking if you develop your app against android 1.5, and you put it on the market, will everyone with 1.5+ see your app?
Yes, but just because it works on 1.5 doesn't mean it will work correctly on 1.6 or even 2.x. For example, one of my apps works in 1.5, 1.6, 2.0, 2.1 but stopped working correctly in 2.2 (froyo). So make sure you at least make sure it works in the emulator for each version. That will not give you 100% result if it will work on all devices, but it will be a start.

Categories

Resources