Android Dynamic Delivery confusion
See original GitHub issueWhat is the best way to deal with Android Dynamic Delivery?
The assumption here is that part of Android app (com.android.dynamic-feature
module) will be downloaded latter at some point. Assuming this dynamic Android module contains Kodein module is there any way to dynamically add it to kodein dependency tree?
Current solution works fine when all modules are known at app start.
class MyCustomApplication : KodeinAware {
override val kodein = Kodein.lazy {
import(androidXModule(this@ShowcaseApplication))
import(appModule)
}
}
However with Android dynamic modules
class MyCustomApplication : KodeinAware {
override val kodein = Kodein.lazy {
import(androidXModule(this@ShowcaseApplication))
import(appModule)
}
//...
fun onFeatureAlbumModuleDownloaded() {
// retrieve insatnce of kodein module from the
// downloaded module via reflection
//Add it somehow to "App level kodein"?
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
How Android App Bundles and Dynamic Delivery will change ...
First up, we'll be blocking uploads of split APKs to the site, as they're of limited use and are likely to just fuel...
Read more >Overview of Play Feature Delivery | Android Developers
Play Feature Delivery uses advanced capabilities of app bundles, ... The following applies the dynamic-feature plugin to your feature module.
Read more >Android App Bundles: there was a problem while parsing the ...
The --modules option gives you the chance to install just the specified modules. However, I guess there is no way to test the...
Read more >Android App Bundle - Dynamic Delivery - MSDN
Android App Bundle - Dynamic Delivery RRS feed ... This is a little bit confusing, because we see the warning and think thats...
Read more >App Failures By Koin: Story 2— Unreliable Dynamic Loading
To begin with, not every Android application needs the dynamic loading ... This will be causing some confusion, as code where a sequence...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I made it work with dependency inversion and a bit of reflection to dynamically retrieve
KodeinModuleProvider
. I am happy with the solution for now, so I will close this issue.Here is a reference to my solution: https://github.com/igorwojda/android-showcase/blob/master/app/src/main/java/com/igorwojda/showcase/app/feature/FeatureManager.kt
Hi @igorwojda, Have you taken a look at Configurable Kodein? I believe it fits exactly your need.
This looks like a legit reason to use
mutable = true
.https://kodein.org/Kodein-DI/?6.3/configurable