protected override void OnCreate(Bundle savedInstanceState) { BlazorHybridAndroid.Init(); var fileProvider = new AssetFileProvider(Assets, "wwwroot"); base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); ZXing.Net.Mobile.Forms.Android.Platform.Init(); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new BlazorApp(fileProvider, ConfigureDi)); }
protected override void OnCreate(Bundle savedInstanceState) { BlazorHybridAndroid.Init(); var fileProvider = new AssetFileProvider(Assets, "wwwroot"); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App(fileProvider)); }
protected override void OnCreate(Bundle savedInstanceState) { BlazorHybridAndroid.Init(); var fileProvider = new AssetFileProvider(Assets, "wwwroot"); base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); Xamarin.Forms.Forms.Init(this, savedInstanceState); _app = new App(fileProvider, collection => { collection.AddSingleton <INotificationManager, AndroidNotificationManager>(); }); LoadApplication(_app); CreateNotificationFromIntent(Intent); }
public override void ConfigureContainer(ContainerBuilder builder, IApplicationContext appContext, bool isActiveModule) { // Configure & register asset file provider var assetFileProvider = new AssetFileProvider(appContext.WebRoot); assetFileProvider.AddFileProvider("themes/", ResolveThemeFileProvider); assetFileProvider.AddFileProvider("modules/", ResolveModuleFileProvider); assetFileProvider.AddFileProvider(".app/", new SassFileProvider(appContext)); builder.RegisterInstance <IAssetFileProvider>(assetFileProvider); builder.RegisterType <BundlingOptionsConfigurer>().As <IConfigureOptions <BundlingOptions> >().SingleInstance(); builder.RegisterType <BundleCollection>().As <IBundleCollection>().SingleInstance(); builder.RegisterType <DefaultBundleBuilder>().As <IBundleBuilder>().SingleInstance(); builder.RegisterType <BundleCache>().As <IBundleCache>().SingleInstance(); builder.RegisterType <BundleDiskCache>().As <IBundleDiskCache>().SingleInstance(); }