How to use Android Jetpack App Startup library
Asked Answered
T

2

10

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.

Tortile answered 31/8, 2020 at 5:43 Comment(0)
H
0

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.

Hansiain answered 2/3, 2021 at 15:23 Comment(0)
V
0

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

Merged Manfest

Vilberg answered 11/6, 2022 at 17:58 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.