Would there be an advantage to moving the service setups from MainActivity and AppDelegate to the App class constructor?
rs-mobitech opened this issue · 0 comments
rs-mobitech commented
I see in the Android MainActivity and the iOS AppDelegate you have the same code:
var themeService = ContainerService.Container.Resolve<ThemeService>();
var languageService = ContainerService.Container.Resolve<LanguageService>();
var splashScreenPage = ContainerService.Container.Resolve<SplashScreenPage>();
var analyticsService = ContainerService.Container.Resolve<IAnalyticsService>();
var notificationService = ContainerService.Container.Resolve<NotificationService>();
var deviceNotificationsService = ContainerService.Container.Resolve<IDeviceNotificationsService>();
LoadApplication(new App(themeService, languageService, splashScreenPage, analyticsService, notificationService, deviceNotificationsService));
Would it better if this were moved to the constructor of the App class instead?
Just wondering why you chose to do it this way and if there is any advantage to doing it the way that you did?