Reputation: 204
As part of Jetpack, there is now a library to handle App Startup. Specifically, you can implement a component initializer for any of your dependencies, apparently ones that use ContentProvider for their initialization, in order to speed up the app startup process.
My question is how should I know which of my dependencies deserves its own component initializer? Do I need to guess that, for example, WorkManager uses ContentProvider and requires its own component initializer while a different dependency doesn't?
Thanks.
Upvotes: 10
Views: 1198
Reputation: 1224
This library is for content providers, because content providers slow down your applications startup time. whenever you use any lib like workmanger or firebase it will autmatically add its own content provider in your android manifest xml file.
you can know which providers added to your manifest from android studio "Merged Manfest" tab
Upvotes: 0
Reputation: 7293
I believe this library is meant mostly for cases when the initialization code can't or shouldn't be accessed from a custom Application
class.
For example, On Demand Modules or libraries that don't want to require the user to call an initialize(context)
method.
Upvotes: 0