0

I'm currently using the old feature plugin for creating an Instant App. In the base feature module's AndroidManifest file I have Activity B that listens for intents following the pattern "/pets/dogs/cages"

In my application module's AndroidManifest file I have Activity C that listens for intents following the pattern "pets/..*/cages". I also have Activity B listed for am using "tools:node="replace" so that the filters previously stated in the feature module are ignored.

The reason for this set up is because i dont want to intercept all web links a user clicks on, i only want to do it if they already have the app fully installed.

This setup works well for the old feature plugin but i'm having trouble trying to achieve this same functionality when switching to app bundles and dynamic features.

In the old setup, the application module's manifest had higher priority. However when migrating to new structure i'm suppose to change the feature module to be the new application module and the old application module to a dynamic-feature module.

Any tips?

user1857437
  • 279
  • 4
  • 14

1 Answers1

0

The thing is, before, the application module was not included in the instant app, so your intent-filter configuration over there was excluded from the instant app. And technically, tools:node="replace" shouldn't have worked since your /dogs/ and /..*/ intent-filters were in separate activities anyways. You probably only observed activity-C handling all the the urls because its intent-filter's coverage included B's, giving it higher priority.

However, now, it doesn't matter installed or instant app, both the application and all modules are merged/included. So your activity-C's intent-filter takes lead.

One way is to upload separate bundles for your installed and instant app. Your instant bundle configured with /dogs/ (with activity-C intent-less), and your installed bundle with /..*/ (with your B intent-less).

(if possible, you could also just combine your B and C together into the same activity, so you don't have to toggle intent-filter configurations between two different activites)

TWL
  • 6,228
  • 29
  • 65