Closed waseefakhtar closed 7 months ago
@waseefakhtar I can work on this issue and I have two ideas in mind and I want your opinion on this.
1st Approach --> Inject AnalyticsHelper in MainActivity and pass it down to DoseApp --> DoseNavHost --> and to each composable.
2nd Approach --> Inject AnalyticsHelper into ViewModel and wherever in composables AnalyticsHelper is required call the viewModel function to log the events.
Sure you can! I meant to use our dependency injection, Hilt, to inject it everywhere. We already have Hilt set up and use it for some dependencies. You can find examples of it in /di
directory
Resolved in #118
@waseefakhtar I can work on this issue and I have two ideas in mind and I want your opinion on this.
1st Approach --> Inject AnalyticsHelper in MainActivity and pass it down to DoseApp --> DoseNavHost --> and to each composable.
2nd Approach --> Inject AnalyticsHelper into ViewModel and wherever in composables AnalyticsHelper is required call the viewModel function to log the events.