Instant app what is the actual sdk minimum

According to the Android developers site, the minimum sdk for Instant is 21, i.e. 5.0. link

The site clearly states: Android Instant Apps are available on most devices running Android 5.0 (API level 21) and higher.

But when we create a new project in accordance with the directive given in this link which says that we need to have a minimum sdk of 23 in order to get support for the instant application.

And it does not allow me to create support for 5.0.

as shown in the image below, which I tried:

enter image description here

+4
source share
3 answers

This requirement exists only in the configuration wizard, and this is an error. If you change the value to something lower after creating the project, you will see that it builds perfectly and can work on API devices 21 and 22.

The documentation is correct regarding supported versions of Android, but note that even this does not dictate any particular minSdkVersion. You can create an instant application with minSdkVersion below 21. It just won’t work until 21, since the Instant Apps Runtime mode itself is limited to 21+.

For this reason, this check was always a mistake, even if we did not support devices before 23. I was told that it was fixed in version 3.0, although I did not check. I checked tonight and confirmed that the check is still present in version 3.0. May be fixed in a newer version. But if not, we must fix it. I will continue.

+3
source

This requirement may be related to support for Android runtime permissions. Request for runtime permissions as an official document.

Note: Starting with Android 6.0 (API level 23), users can revoke permissions from any application at any time, even if the application targets a lower API level. You should check your application to make sure that it behaves correctly when it lacks the necessary permission, regardless of what level of API your application is targeting.

It is currently fixed using Android version 3.1 Canary 5

android studio 3.1 welcome channel canary 5 android studio 3.1 Canary 5 create project step

+2
source

For example, API for applications at least 23: Android 6.0 (Marshmallow).

Please follow this link https://developer.android.com/topic/instant-apps/getting-started/first-instant-app.html

0
source

Source: https://habr.com/ru/post/1271142/


All Articles