protected override void InitializePlatformServices() { var lifetimeMonitor = new MvxAndroidLifetimeMonitor(); this.RegisterServiceInstance<IMvxAndroidActivityLifetimeListener>(lifetimeMonitor); this.RegisterServiceInstance<IMvxAndroidCurrentTopActivity>(lifetimeMonitor); this.RegisterServiceInstance<IMvxLifetime>(lifetimeMonitor); this.RegisterServiceInstance<IMvxAndroidGlobals>(this); var intentResultRouter = new MvxIntentResultSink(); this.RegisterServiceInstance<IMvxIntentResultSink>(intentResultRouter); this.RegisterServiceInstance<IMvxIntentResultSource>(intentResultRouter); }
protected override void InitializePlatformServices() { var lifetimeMonitor = new MvxAndroidLifetimeMonitor(); Mvx.RegisterSingleton<IMvxAndroidActivityLifetimeListener>(lifetimeMonitor); Mvx.RegisterSingleton<IMvxAndroidCurrentTopActivity>(lifetimeMonitor); Mvx.RegisterSingleton<IMvxLifetime>(lifetimeMonitor); Mvx.RegisterSingleton<IMvxAndroidGlobals>(this); var intentResultRouter = new MvxIntentResultSink(); Mvx.RegisterSingleton<IMvxIntentResultSink>(intentResultRouter); Mvx.RegisterSingleton<IMvxIntentResultSource>(intentResultRouter); var viewModelTemporaryCache = new MvxSingleViewModelCache(); Mvx.RegisterSingleton<IMvxSingleViewModelCache>(viewModelTemporaryCache); InitializeNavigationSerializer(); InitializeSavedStateConverter(); }