Hacker News new | ask | show | jobs
by belimawr 1234 days ago
I get the author's sentiment. But speaking as an Android developer, we are forced to use newer APIs due to the following:

1. Deprecation - Google is notorious for deprecating APIs (it's a meme among Android devs) and we as developers are forced to move to using newer APIs

2. Google Play policies - From Google: "New apps must target Android 12 (API level 31) or higher; except for Wear OS apps, which must target Android 11 (API level 30) or higher."

3. Some APIs such as Jetpack Compose require a certain minimum SDK version (API 21). Therefore, if you want to use new APIs, you are forced to stop supporting old devices.

We wish we could continue supporting old devices but it's mostly out of app developers' hands.

1 comments

I just wanted to correct a little bit of misunderstanding here about how target SDK works (and min SDK).

Having a target SDK e.g. at Android 12 doesn't prevent you from supporting versions of Android before 12, it prevents you from fully supporting Android devices newer* than Android 12.

The target SDK defines what is the minimum feature set that you have access to (and sometimes what you're required to implement). If you target API level 31, you can add all of the latest features (e.g. improvements around network usage to save energy that wasn't present in older SDK versions).

You, as a developer, decide on your "min SDK", which is the lowest level of Android that you're willing to accept. That is determined by how much you're willing to work around missing or buggy features in old SDK versions, something with is really helped out by using AndroidX (née Support Library), which is a shim you install that provides compatible implementations of newer features when your APK is installed on older phones (similar to polyfill on web).

* During the beta of a new target SDK, old phones won't run an app targeting it, this is to prevent people from building and shipping apps against a beta SDK.