Preconditions
I have the following components:
- ApplicationCompoennt - With @ApplicationScope - This component contains LogModule. The logmodule @Provides Logger.
- ActivityComponent with @ActivityScope - This component contains MyActivityModule. Since one can't call the ctor of Activity explicitly, this module is used to inject the activity. This component depends on @ApplicationScope component, to use the Logger.
- BroadcastComponent with @BroadcastReceiverScope - This component contains BroadcastReceiverModule. Since one can't call the ctor of it explicitly (its present in the Android manifest file), this module is used to inject the broadcast receiver.
Problem:
I cant create ActivityComponent with 2 dependencies namely ApplicationComponent and BroadcastComponent, they being of different scopes, as we cant have dependent components of different scopes
How to get around this problem ?