How to choose which minSdkVersion? - android

I developed an application and I put it on Google Play, but the thing is that sometimes, some people fail to install it and i don't know the reason.
However, i'm not sure if the reason is because my minSdkVersion is set to "8".
I'm using Android 2.2 API.
Is it ok to set the minSdkVersion = "1" ? and what are the disadvantages of putting it as "1" instead of "8". How should I choose it? That makes me confused because in the same time I want everyone to install my app.

There is very little benefit from using API 1 as the minimum SDK. Check out Android's Dashboard of active devices. It shows that 3.1% of users still have API 7 or below, 0.4% for API 6 below.
You will also find great difficulty, if it is even possible, to recreate many of the modern features in API 1... even the Support Library only works on API 4+.
In short, it is unlikely that your minimum SDK version is the culprit.

Only set the minSdkVersion to the lowest you have tested on. If you use features that are specific to API level 8 (or higher), and don't specifically check for their existence, then your users on lower versions won't be able to run anyway.
Running lint can also smoke out bugs from lower versions.
This number will only filter out users on the market. They will get a message saying the app isn't compatibile with their version. It sounds to me like the problems you are having are that users are failing to install. I don't believe changing the minSdkVersion will help you there. This is most likely to do with bugs in the Android Market version they are using.

Related

My Android app is not working properly once I set targetSDK as API 30; how do I figure out the reason(s)?

According to Google, all new Google Play apps from August 2021 would need to target API 30, besides being derived as Android App Bundles. Furthermore, from November 2021, even app updates would need to conform.
So I was updating my app from targeting API 29 to API 30, and some functions broke. How do I figure out the reason(s)? From the list of changes given by Google, it is not obvious, as it is not just a matter of checking whether certain deprecated APIs are being used.
Ideally, if Android Studio might provide a way to see how features in API 30 affect my app behavior, that would be cool.
I discovered a cool feature in Android Developer options, called App Compatibility Changes. Google describes these Compatibility Framework Tools in this way:
Android 11 introduced new developer tools for testing and debugging your app against the behavior changes in newer versions of the Android platform. These tools are part of a compatibility framework that lets app developers turn breaking changes on and off individually using developer options or ADB. Use this flexibility as you prepare to target the latest stable API version and as you test your app with the preview release of the next Android version.
Wow, and looking at it on the phone, it appears you can actually toggle each new feature/change on or off individually?
Well, let's see; first it gives us a list of all the debuggable apps on the device, and if we select one of them, say, targeting API 29, then we can actually toggle on/off each API 30 feature individually, as shown in the example below, with CALLBACK_ON_CLEAR_CHANGE.
Cool! Just two points to note: this works with debuggable apps only; and if you're wanting to turn on/off features of API 30, build your debuggable app targeting the API level below it, i.e., API 29 in this case, and then turn on/off features and test away! If you've no idea which feature is causing the problem(s), you can speed up the search by selecting, say, half of the 30 or so changes, see if the problem(s) are there or not, and so on, to zoom in to the right toggles.

Recommended Minimum Android App SDK

I am making an android app, and am wondering what the industry's thoughts are on supporting older android versions like GingerBread and FroYo. Should a developer like me take the extra step to make my app compatible with those older versions, or are they obsolete? I am speaking in terms of the market in 2014.
Increasing my minimum SDK version opens up some more APIs, so which option should I pick, compatibility or APIs and features?
Most of the Android devices are above the Gingerbread level. But there are still a decent number of those devices out there. You, as a developer, must decide if the number of users who would potentially download your app for those versions of Android is worth the level of effort in developing the app for those versions. For the past year, both companies I've worked at have begun to work on 4.0 and above only and have forsaken the lower versions.
To get the current information on what the ecosystem looks like for Android, check out Google's dashboard
As I write this comment, Gingerbread and below is around 15% of the total population.
2019 UPDATE: Google's dashboard states that only 0.2% of Android users are running Gingerbread (Android 2.3). Around 3% are using Jelly Bean (Android 4.1/4.2/4.3), and 7.6% are running KitKat (Android 4.4).
Generally, companies target a minimum version of KitKat, or SDK 19, for new endeavors. For personal projects, we usually choose Lollipop, or SDK 21, as it brings a number of improvements to the table, such as improved build times.
[2020 UPDATE] You need to base on Android Pie Chart . It is always updated.
here's the link of the dash board:
https://developer.android.com/about/dashboards/index.html
For the record - 2020 April
If you look at the comments, they usually set the min level to 19 since years ago. Right now, it is nonsense (also, some comments are obsolete).
We are looked at the statistics of Google, and they say, "+10% of the devices are KitKat or lower. However, it's tough (if any) to find a company that sells phones for Kitkat.
So, why Kitkat 19 is still popular? Because old smartphones simply don't go away (and they aren't updated).
Then, technically 10% of the market uses Kitkat or lower but that information is mostly useless
From then 10%, how many of them will install your application? Or any new application?. I know a lot of people that are happy with their old-and-rusty phone, but they only use for making calls and watch youtube/browser internet. So, usually, the lower 10% is not part of our target market or the target market of anybody.
Twitter said about it:
minSdkVersion ยท Nov 7, 2016 19
minSdkVersion Apr 23, 2018 21
minSdkVersion Dec 9, 2019 23
When Twitter says API=23, then Twitter is ignoring 25% of the market. It is a huge number. But again, this number means nothing without analysis. Twitter decided that this number is moot because, of the 25% of the users that use an old phone, they are not really in its market share, i.e., people that don't use Twitter on their phones using an application.
So, for the record and as for April 2020.
API = 19 who are you pleasing? Remember, we are 4 years later in comparison with Twitter.
API = 21 is a moderated number.
API = 23 sounds like a rational number.
For example, I run a windows server, and the default browser is Internet Explorer. Do you know how Internet Explorer works in the real world? It doesn't!. It works with google and a few sites, but everything else is broken. And still, developers "support" internet explorer because of the non-existence 6.97% market share (the users exist, but they are not everybody users but intranet users).
Now, if your application is for a government/public interest, then we should stick with the standard or official procedure, and sometimes it could be around API 15 or 16.
For those who are looking for an opinion to refer to, #minSdkVersion updates their Twitter account when they deem it appropriate to start using a higher minimum SDK version. They claim
The minimum SDK version for the practical, rational developer.
As others have mentioned, it's also worth checking the Android distribution dashboard. The full platform version disribution can be found in Android Studio's Create New Project wizard.
UPDATE JULY 2022
This is what Android Studio shows before creating a new Project.
I'm a developer myself. I would look into this from multiple point of view and I would use several factors to begin a project with a particular sdk as minimum.
Beside the chart, that Google is kind enough to publish, which is really helpful and informative and i believe it represents devices around the world.
These are the factors I would take under consideration:
What's my app all about? What kind of people and what kind of age range would attract. Young people tend to keep their gadgets up-to-date.
In which country I'm going to release my app? Not all countries have the same mainstream when it comes to technology.
Does the minimum sdk affects the time or the resources that are going to be used in the app? If having a high sdk as minimum is inversely proportional with the time and the struggle my developers would face in order to make everything compatible, then I would choose a higher sdk, even if I have to exclude a small proportion of users. Let's face it, this is 2016. Technology is running faster than light. Releasing early really matters. In the other hand, if it really doesn't affect that much, then just choose a version that covers most devices.
Security matters as well. Everyday new issues are being patched. Newer version is more secure.
If the idea is powerful, than I would choose as higher as I could. People will follow. Is the truth.
Many functionalities are being deprecated. And usually in older versions. Upgrading from those can be hell.
Can't think of anything else. But if you want my opinion, I would choose API 19 as minimum.
Cheers.
There were only few (~10) percent of users with Gingerbread to download our application from Play Store, so we have decided not to support it anymore. It was about 7 months ago. Froyo and Honeycomb are dead for much longer time.
We would go with Android 4.0 (API 14) as minimum for new projects. There is no real benefit from supporting older version unless you are forced to do so (client requested it, etc.).
Note the new directive from Google around the dropping of support for ICS (sdk 14 and 15). Recommended course of action is to set your minimum to 16. See https://android-developers.googleblog.com/2018/12/google-play-services-discontinuing.html
Note that existing apps will continue to work ok.

Upgrade Android Api Version

I have an Android device, apparently with API Level 10.
I'm developping an Android Application and I need to test it on API level 12.
I don't know much about Android and API levels, so my question is: Can I update my device to a higer API level ? (it says no New version available, aren't hier APIs considered new version?)
(I can't use the Emulators, as they really need a huge amount of ressources to start.)
Alternatively, is it possible to test the following code, on my API Level 10 device ?
UsbManager manager = (UsbManager) this.context.getSystemService(Context.USB_SERVICE);
I have the following warning:
Yes higher API levels = latest releases.
http://en.wikipedia.org/wiki/Android_version_history#Version_history_by_API_level makes the correlation between API and version number (2.3.4).
You should work with a device supporting latest api and high resolution because many of your users might have that and you NEED as a developer to see and test your work on these platforms.
Get yourself a nexus phone, you can upgrade these to the latest Android version.
Android version release : Google releases it --> manufacturers and Telecom Carriers checks and adjust the release before making it available to you. Hence, for old phone, the manufacturers and carriers don't make the effort and you are stuck to old versions.
If you do no want to or if you cannot find a more recent handset, you can install a custom ROM to try to reach API 12. But in any case, if you start developing, you ll need good handset soon.
good luck
You can try to see if there is a custom rom for your device that is of a higher api version. But this won't accurately test your app because there is probably a very good reason that a newer operating system was not made available for your device. As such, your app and the SDKs in the new API will probably not be able to make use of the hardware resources available, and you won't get an accurate representation of your app's performance.
You mentioned you can't use emulators but have you considered Genymotion's emulators? Although it is resource intensive it is better than Google's emulators and is faster than actual devices.
Assuming your using Eclipse ADT. You DONT have to update your device to level or API 12. All you have to do is specify the minimum required SDK, which is API 8 in most Eclipse ADT setups. and set your target SDK to API 12. That way your app will run on devices from API 8 through to API 12 Including you device. FYI the latest API is now 19 (Android 4.4) Hope this helps.

why is Android API level 9 obsolete?

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.

When does Android check Min-sdk?

My application is targeted for API 8 (Froyo) minimum, however I'm getting a message in the Android Market that says "This report was sent in by a pre-Froyo client, which did not include a stack trace."
When does Android check that the Min-sdk is greater than or equal to the API version on the phone. Is it at runtime or market download time?
Your app's minSdkVersion is filtered by the Market and the phone, however there are a few ROMs out there that disable this filtering at the phone-level. If you're seeing a report from a phone that is below your minSdkVersion it usually means the user installed the app directly, not from the market, and their phone tried to run it even though the SDK version wasn't usable by the device. This would result in a bug report being posted to the Market, but the Market app doesn't ask the device how it got the app in the first place.
You'll see this once in a really long while--it's nothing to be alarmed about.
I believe it filters in the market. Perhaps somebody got ahold of your APK and distributed it to a pre-Froyo phone? Just a guess.
edit - taken from the ref http://developer.android.com/guide/topics/manifest/uses-sdk-element.html: An integer designating the minimum API Level required for the application to run. The Android system will prevent the user from installing the application if the system's API Level is lower than the value specified in this attribute. You should always declare this attribute.
Perhaps you have confused minSdkVersion and targetSdkVersion?

Categories

Resources