It looks like right now that Android Instant Apps are supported in Android 5.0 or later. However, App Links (which I understood that Instant Apps depend on) are only supported in 6.0 or later. I've searched online but couldn't find clear answer on this.
In general it looks like we'd want, to support Instant apps, to use app links to navigate between activities in different feature modules, but also need in most cases to use those modules to build installable apk that works on versions below 5.0
Does this mean that code needs to check the API level and use different approaches depending on version (e.g calling startActivity
with explicit intent if < 5.0)?
This is the info I've found in the Instant Apps documentation:
Both your instant and installable versions of your app must implement the Android App Links feature introduced in Android 6.0. App Links provide the primary mechanism for connecting URLs to discrete activities within your app.
and
an instant app cannot launch an activity in another feature directly; instead, it must request the URL address that corresponds to the other other feature's entry-point activity.
and then from https://developer.android.com/topic/instant-apps/index.html
Android Instant Apps supports the latest Android devices from Android 5.0 (API level 21) through Android O