i am confuse about android fragmentation. I know about memory fragmentation But unable to understand that What is android fragmentation issue. Although i find many definitions like
Android fragmentation refers to a concern over the alarming number of
different available Android operating system (OS) versions in the
market. The main issue is potentially reduced interoperability between
devices of applications coded using the Android Software Development
Kit (Android SDK).
Can somebody please explain this phenomenon simply. ??
Simply put, there are too many Android devices out there with different OS versions, screen form factors, varying hardware specs etc., all of which are expected to run every single Android app ever developed without there being any noticeable differences in performance, reliability and so on.
Examples:
The Fragment & ActionBar classes were introduced in API level 11. Multiple AsyncTasks would run separate threads in parallel between API level 8 and 10, and serially from API level 11 onwards. This required developers to take cognizance of app behavior on different OS versions. To assist developers, Google provided support libraries that would provide newer APIs' on older platforms that did not have those features. The latest version of the support library lets you have the new Material Design features on older platforms.
An app's UI needs to be uniform across tablets, phablets and handsets alike. This is why the Android framework compels developers to prepare layouts as an XML hierarchy: this is a self-scaling approach that automatically scales & positions UI elements on different screens with the correct proportion and sizing. Also, apps can display totally different UIs' depending on the screen size and OS version, and the Play Store even lets you upload different app versions for different screen sizes or different OS versions.
Apps that have specialized hardware requirements will also not run on phones that do not have those features. Games like Asphalt, for instance, require a pretty powerful processor/GPU & lots of memory, and cannot run on low-end devices. Some apps require certain specific sensors, and will not even be visible in the Play Store on phones that do not have those sensors. The Bluetooth Low Energy (BLE) functions were introduced on API level 17, and will not run on lower platforms.
The Android SDK is designed to help developers overcome the problem of fragmentation.
It's not a technical thing like memory fragmentation. In this context, the word "fragmentation" refers to the changes in user experience (menu items getting moved around, etc.) and developer experience (which APIs are available, etc.) from one version of Android to the next. Sometimes developer-facing API changes influence the user experience. For example, a user's favorite widget might stop working on the latest version of Android because Google decided to break some API that it depends on. Vendors and carriers make it worse with all the customizations they install, plus weird device-specific bugs. The end result is that there are effectively hundreds of different versions of Android instead of just a dozen or so. It becomes very difficult just to get an app to run on all of them, let alone provide a consistent user experience.
I don't think anyone has ever attempted to develop a metric for this kind of fragmentation, so it's hard to say whether Android is really more fragmented than other platforms. My impression is that it is, but my standard for comparison is the J2SE API.
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
(Let me begin by saying that a) I appreciate this is the wrong place to ask which version I should use, especially because my question is only locally relevant, and b) I am surprised this hasn't been done to death, but it appears it hasn't!)
At work, I have been tasked with writing an Android application for internal use, by largely non-technical users. We have an existing application (which is dire), and a bunch of devices (currently all 7" tablets, but this is not necessarily going to be always true) running Froyo and Gingerbread for which the manufacturer has no plans to release ICS updates. On the one hand, it would suck to obsolete that hardware (although we could go for non-supported ICS-based 3rd party ROMs), but on the other hand it seems crazy to restrict myself to the 2.2 API when ICS seems to offer a range of shiny new features.
Is there a good comparison reference out there, to see the key differences between API levels? Also, given the glacial adoption rate of 4.0, am I insane to even consider dropping 2.x just yet? And most importantly of all, what factors should inform my decision as to which API to support, that I haven't even mentioned above?
First Question you have to ask yourself is: Which feature do you want to use from ICS which is NOT available in 2.2/2.3 ? If the answer is "I don't know" then you absolutely should stick to 2.2. You have the option to use a SupportPackage, if you like to integrate some features of Higher Versions.
If you know a specific feature you'd like to use, check if it is inside the SupportPackage.
You can use this
http://developer.android.com/sdk/api_diff/9/changes.html
for differences.
I personally think that for phone apps support for new apps must be from 2.2 onwards. For tablet 3.0 onwards, because 3.0 and onwards are really tablet OS'es and 2.2,2.3 are phone OS'es. You can use support packages for lower versions if you need higher end features(not all of them, but important ones like fragments etc.,). But for Phones I d stick to 2.2 and for tablets well, since Android was customized 3 onwards for tablets, I generally would go for that, unless you have 2.2, 2.3 tablets in mind as targets.
I am trying to write an android application that uses several of the android apis(like policy manager, package manager, wifi apis etc).
The concern i have is, android being open, manufacturers/carriers are free to take any specific version of android as their start point and customize the same and ship it with the device.
Note:Please excuse me if this post is in anyway a repeat of earlier posts on the same/similar topic. In such a case, appreciate anyone sharing the earlier post.
Few things that bother me are:
Does android enforce/require manufacturers/carriers to retain the default apis and only over-ride/customize the look-and-feel?
even if manufacturers change the implementation/behavior of the basic apis that comes from android, do they adhere to the interfaces so that my code doesnt break?
how do i ensure/test that my code works on all of the android devices since there is a possibility that one or more customizations could break my whole application?
I know these are some naive questions for many of you who may have been on android for a while, but any pointers in this regard would be of immense help.
Any other information in general w.r.t cross version, cross device incompatibilities and strategies to deal with them would be very helpful.
Thanks a lot in advance.
Regards,
Deepak
Your concerns (and many other developers) are addressed by: http://source.android.com/compatibility/index.html
But this still does not guarantee that manufacturer will not change API and break your application.
The common approach is to initially target subset of devices that make up large percentage of market and then implement workaround for other devices (if necessary). Sample info about device market penetration can be found at:
http://opensignalmaps.com/reports/fragmentation.php?
Kind regards,
Bo
First off, I don't believe you should need to worry about this. Only after you have thousands of users will you end up needing to face the more complex issues caused by the great number of manufacturers offering Android devices. This should not discourage you from developing for Android.
Does android enforce/require manufacturers/carriers to retain the default apis and only over-ride/customize the look-and-feel?
No. But it would certainly work against them if they remove important APIs from the system. The core exists as a whole, though there really isn't anything preventing them from removing or disabling chunks as they wish. For example, AT&T had disabled the ability to sideload apps on Android devices some time ago (but I don't think they still do that). An example of a device with reduced functionality: Amazon Kindle Fire. It doesn't at all look like Android in the majority of its interfaces (except within third-party apps) and it doesn't offer the complete API set. Even with those dramatic changes, Android app developers still have great success building and selling apps that run well on the Kindle Fire.
Even if manufacturers change the implementation/behavior of the basic apis that comes from android, do they adhere to the interfaces so that my code doesnt break?
That's the idea, but there isn't anything in place to forbid them from breaking things. Nor is there anything that will keep them from introducing bugs accidentally.
How do I ensure/test that my code works on all of the android devices since there is a possibility that one or more customizations could break my whole application?
I know that some manufacturers will offer an emulator for their devices/configurations to help test against their systems. For example, Motorola offers MOTODEV Studio for this purpose.
I have been developing for Android 2.2+ for the majority of the year. But when I look at the "List of Android Devices" on wikipedia, I see a substantial number of Android 2.1 devices. A lot of these may have never received OTA updates and some were released not that long ago. I've seen the readily available statistics about Android 2.2 being the most widely used, but I can't help feel like I'm cutting a big audience out.
I've seen a few differences between 2.1 and 2.2 (like with TabWidgets) but if I just dropped my SDK down to 2.1 what differences should I be aware of?
Is this even less relevant now, thoughts and experience welcome, or links to informative sources
As always, it depends on the specific features of your application. I don't want to talk you out of supporting 2.1. I'm certainly not an expert. But you have to weight how much work it is to make your application available to the last 20% percent of the market.
Although I like the idea of maintaining a lot of backward compatibility, I think it makes sense to support the "current and future market" more than spending a lot of effort to support older devices. Of course, if your application works well with older API levels that's great and you should obviously set it as such. Who knows, maybe adding support for 2.1 will take you less time than it took me to type this. :)
You can see up-to-date stats directly on the Android Platform Versions website.
I think the more interesting graph is the 2nd one that shows "number of Android devices that accessed Android Market" recently. (current one inlined here). So if you support 2.2 it looks like you're supporting over 75% of the market (and that number is only going to grow).
One other thing to watch out for is performance. In addition to features the pre-8 API doesn't support, older devices sometimes just don't have the performance of the newer ones. (Not always the case since there are dozens of devices.) One test device I used didn't support Live Wallpapers, not because of the API, but because the device just didn't have enough horsepower.
I'd definitely target 2.1 to get the largest audience.
The changes you have to be aware of are not huge, but can definitely stick you if you don't catch them.
A couple of things:
showDialog(int) can't take a Bundle as an argument in 2.l. The 2.2 call is: showDialog(int, Bundle)
You use a different function to access the SD card (also note that the SD card paths are different in 2.1 and 2.2)
I suggest using the android dev's reference pages feature of filtering by version. It'll make coding for 2.1 much easier.
http://developer.android.com/sdk/android-2.2.html
Personally I think you should just use the lowest you can support without damaging your functionality, features or UX.
With Android platform fragmentation, what changes in different OEM handset attributes force developers to port from one platform to another?
Generally speaking, there are no "changes" that "force developers to port from one platform to another" within Android.
There are some bugs in some devices that require workarounds, but these tend not to affect large percentages of applications. Otherwise, the devices would not have passed the compatibility tests.
However, there are two cases where "changes" do exist:
Developers who elect to ignore the SDK boundaries and work with undocumented things will find that those undocumented things are undocumented for a reason, and that OEMs are welcome to change them.
OEMs who do not include the Android Market on their devices, and therefore do not necessarily pass the compatibility tests, may or may not produce devices that will work with third-party Android applications.