I tested compostTestRule in compose project with Application. The Application class can also be called when running a UI test without Hilt DI. But when I added Hilt DI, had to annotate the android UI test as HiltAndroidTest and add HiltAndroidRule, the application class would not be called.
There are some initialization work in application class, so my launcher activity depends on the result from the application class. How should we handle this when Hilt is used as DI? Is there a sample project I can refer to?
I tested compostTestRule in compose project with Application. The Application class can also be called when running a UI test without Hilt DI. But when I added Hilt DI, had to annotate the android UI test as HiltAndroidTest and add HiltAndroidRule, the application class would not be called.
There are some initialization work in application class, so my launcher activity depends on the result from the application class. How should we handle this when Hilt is used as DI? Is there a sample project I can refer to?
Thanks