3 ms·
> As we announced recently, Google Play will require all app updates to target Android Oreo (targetSdkVersion 26 or higher) by November 2018 Android Oreo is on
by Osiris 9y ago
> As we announced recently, Google Play will require all app updates to target Android Oreo (targetSdkVersion 26 or higher) by November 2018
Android Oreo is only running on 1.1% of devices [1]. Will targeting the newest API prevent the app from being available for in the market for devices running Nougat or earlier or does it just limit the functionality?
[1] https://www.androidauthority.com/android-version-distribution-748439/ https://www.androidauthority.com/android-version-distributio...
- mjw1007 9y agoNeither of those things. Targeting Oreo means telling the OS to disable backwards-compatibility behaviour which would otherwise apply.
- falnatsheh 9y agoYou could target Oreo but I assume you could still set minSdkVersion lower than that.
- dukoid 9y agoThere are two API levels for Android Apps: The minimal API level and the target API level. Perhaps it makes sense to see the target API level as the "maximum" API level the App fully understands. For instance, Android can't enforce dynamic permissions on older Apps not designed for this, and people have been exploiting this by keeping the target API level low.
- adrianmonk 9y agoAndroid apps declare two versions. Basically, the oldest version they can run on, and the newest version whose quirks and new behaviors they're aware of. A good concrete example is the switch from making users agree to permissions when they install an app to runtime permissions. In the new style, the app is responsible for bringing up dialogs to ask for permissions. In the old style, the system does it when you install. So how does the system know whether your app knows how to ask? By setting targetSdkVersion to 23, you tell the system, "It's safe to assume I know about this new API I'm required to implement." But that doesn't preclude your app from running on older systems, where things behave just like they always did.
- izacus 9y agoJust so we're clear on scope - 1.1% of global Android devices is still 20+ million customers. That's 2/3 of all iPhone X devices sold by the end of 2017 (quoted at 30 million). Also that dashboard can be misleading - if you check any english app you'll probably have more like 40% of 7.0 and 10-20% of Oreo deployed. As for targeting - targetSdk determines against which version of Android APIs are you linking against (the stub .jar) and by extension which compatibility shims will new Android versions use. If you listen to a linter and properly guard usage of APIs added in newest Androids then the app will run well on old Android versions as well. The main benefit of this change is security - if your app doesn't target Android 6.0 or newer, it's exempt from the new permissions system introduced in 6.0.A lot of companies, including large ones like Facebook and Snap, deliberately refused to support new Android features so they could access hardware and collect data without explicitly asking for permission. This change forces them to start using those new APIs.