3

I have an Instant App with multiple features, with 1 deeplink entry point per feature (features are independent of each other, except base-feature which is consumed by all features). The generated instant app build has 1 APK for base-feature and 1 APK for each included feature.

  1. If user clicks on a deeplink handled in one feature - are all features downloaded or only the relevant feature?
  2. From #1, If only the relevant feature is downloaded, how can I verify this before going to production? What happens if user, while using instant app with Feature#1 invokes a deeplink that needs Feature#2 - is the app blocked while Feature#2 is downloaded?
  3. Does the sum of all features need to be within 4 MB, or that limitation is for individual pairs of one base and one feature module?
  4. If the 4 MB limitation is on the sum of base and all feature modules - can I have multiple instant apps for each feature module to bypass this? Looking at the Play console, I don't think we can upload multiple instant apps with same version.
dev
  • 11,071
  • 22
  • 74
  • 122

1 Answers1

4

You are correct, each feature within the instant app has at least one Activity that acts as the entry-point for that feature.

Adding some details:

  1. When users request a feature from an instant app, they receive only the code necessary to run that specific feature, no more and no less.
  2. An activity cannot launch another activity directly within an instant app; rather, it must request the URL address that corresponds to that activity. You can navigate by building an INTENT(request URL address); to open feature2, you may call this from feature1.
  3. For an instant app with multiple features, you must add the size of the base feature APK to a single feature APK. The total size of both these APKs must be under 4MB.
  4. When users request a feature from an instant app, they get two feature APKs: the corresponding feature APK and the base feature APK. If the same user requests another feature from the same instant app, they might receive just the feature APK because they have already downloaded the base feature APK. A single feature can have multiple entry-point activities. For example, a feature might have two related activities that the user switches between, where each activity has its own URL address.

    You can also refer Google developers documentation and FAQs link.

ManmeetP
  • 801
  • 7
  • 17