google-ar / arcore-android-sdk

ARCore SDK for Android Studio
https://developers.google.com/ar
Other
4.91k stars 1.2k forks source link

Does minSdkVersion really need to be 24 for AR Optional apps? #1650

Open tangobravo opened 1 month ago

tangobravo commented 1 month ago

The current getting started doc at https://developers.google.com/ar/develop/java/enable-arcore mentions the minSdkVersion is 24 for both AR Required and AR Optional apps.

The last time I integrated ARCore into an AR Optional app this was 14 (it was a while ago!). I can't see any mention of this changing in the release notes. The last mention of a change I could see is 1.31 suggesting it was being increased to 19.

Archive.org shows a change in the getting started docs from 19 -> 24 in late 2022, when it was showing 1.33 as the version in the gradle snippet.

I'd like to understand the true minSdkVersion for an AR Optional app - there's currently around 4% of devices with API levels 19-23 so for an app where the AR Core part is optional it's not a completely negligible percentage yet.

devbridie commented 1 month ago

Hey, No matter whether the app is AR Required or AR Optional, ARCore requires SDK version 24 to run. On SDK 19+, you can use ARCore to call checkAvailability, which will never succeed on SDK <24.

I'm seeing that the Java/C docs are unclear on this, so I'm updating it to how it's stated in the Unity doc: AR Optional has minSdkVersion: Android 4.4 (API Level 19), though running any AR functionality requires at least Android 7.0 (API Level 24).

tangobravo commented 1 month ago

Thanks!

Along with the tables in the "Enable AR" docs, there's also text about specifying minSdkVersion of at least 24 in the manifest in the part that is shared between Required / Optional apps that could have a little additional clarification as a comment.