This is a Flutter Add2App Android module implemented with Feature Delivery. With this, we can achieve that our Android application can dynamically download an Android module that internally contains Flutter features.
- Clone repo.
- In
my_flutter_module
runflutter build aar
. - Open the Android Project, sync, switch variant to
release
and create a Bundle. - In the generated Bundle directory, run:
bundletool build-apks --local-testing --bundle=app-release.aab --output=app-release.apks
bundletool install-apks --apks=app-release.apks
- First screen:
- Tap on the first button to simulate download the feature.
- Wait a second (sometimes the process to simulate the installation needs it) and then tap on the second button to launch an Activity from the Feature Module through an Intent.
- Second screen:
- This is an Activity that lives in the Feature delivery module. It contains a button for launch a FlutterActivity. Tap it. In release mode, we have an error.
- Third screen:
- A Flutter screen.