protected override void OnCreate(Bundle savedInstanceState) { base.SetTheme(Resource.Style.MainTheme); base.OnCreate(savedInstanceState); Xamarin.Forms.Forms.SetFlags("RadioButton_Experimental"); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); global::Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState); FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true); global::FFImageLoading.ImageService.Instance.Initialize(new FFImageLoading.Config.Configuration() { Logger = new DebugLogger() }); UserDialogs.Init(this); NotificationCenter.CreateNotificationChannel(); LoadApplication(new App(new AndroidInitializer())); NotificationCenter.NotifyNotificationTapped(base.Intent); }
protected override void OnNewIntent(Android.Content.Intent intent) { NotificationCenter.NotifyNotificationTapped(intent); Push.CheckLaunchedFromNotification(this, intent); base.OnNewIntent(intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, savedInstanceState); //Nugets!! Brot Acr.UserDialogs.UserDialogs.Init(this); //Initialazing Rounded Img ImageCircle.Forms.Plugin.Droid.ImageCircleRenderer.Init(); //Images FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true); //Initializaing Popup Rg.Plugins.Popup.Popup.Init(this, savedInstanceState); Xamarin.FormsGoogleMaps.Init(this, savedInstanceState); NotificationCenter.CreateNotificationChannel(); LocalNotificationsImplementation.NotificationIconId = Resource.Drawable.BrotWhite500; LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { LocalTelemetryService.Current.Init(); FirebaseTelemetryService.Current.Init(this); AppCenterTelemetryService.Current.Init("79771c81-f748-4649-8787-74508df44145", typeof(Analytics), typeof(Crashes)); ApplicationInsightsTelemetryService.Current.Init("55f4c3a7-8bd1-4ec0-92b3-717cb9ddde1d"); SQLitePCL.Batteries.Init(); base.OnCreate(savedInstanceState); /*if (CanCreateNotificationHub()) * CreateNotificationChannel();*/ UseDefaultConfiguration(savedInstanceState); Forms.SetFlags("StateTriggers_Experimental"); Forms.Init(this, savedInstanceState); NotificationCenter.CreateNotificationChannel(); LoadApplication(new App(new SampleAppDroidInitializer(this))); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, savedInstanceState); CachedImageRenderer.Init(true); UserDialogs.Init(this); // Must create a Notification Channel when API >= 26 // you can created multiple Notification Channels with different names. if (Build.VERSION.SdkInt >= BuildVersionCodes.O) { NotificationCenter.CreateNotificationChannel(new Plugin.LocalNotification.Platform.Droid.NotificationChannelRequest { }); } LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(Intent); //SetTheme(Resource.Style.MainTheme); }
protected override void OnCreate(Bundle savedInstanceState) { LocalTelemetryService.Current.Init(); FirebaseTelemetryService.Current.Init(this); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; SQLitePCL.Batteries.Init(); base.OnCreate(savedInstanceState); /*if (CanCreateNotificationHub()) * CreateNotificationChannel();*/ UseDefaultConfiguration(savedInstanceState); Forms.SetFlags("StateTriggers_Experimental"); Forms.Init(this, savedInstanceState); NotificationCenter.CreateNotificationChannel(); LoadApplication(new App(new SampleAppDroidInitializer(this))); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { Window.SetBackgroundDrawable(new Android.Graphics.Drawables.ColorDrawable() { Color = Android.Graphics.Color.White }); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental"); base.OnCreate(savedInstanceState); App.ScreenHeight = (int)(Resources.DisplayMetrics.HeightPixels / Resources.DisplayMetrics.Density); App.ScreenWidth = (int)(Resources.DisplayMetrics.WidthPixels / Resources.DisplayMetrics.Density); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); CachedImageRenderer.Init(true); CardsViewRenderer.Preserve(); var config = new FFImageLoading.Config.Configuration() { VerboseLogging = false, VerbosePerformanceLogging = false, VerboseMemoryCacheLogging = false, VerboseLoadingCancelledLogging = false, Logger = new CustomLogger(), }; ImageService.Instance.Initialize(config); UserDialogs.Init(this); Xamarin.FormsGoogleMaps.Init(this, savedInstanceState); NotificationCenter.CreateNotificationChannel(); LoadApplication(new App(new AndroidInitializer())); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); //for indicator view Xamarin.Forms.Forms.SetFlags(new string[] { "IndicatorView_Experimental" }); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); Rg.Plugins.Popup.Popup.Init(this, savedInstanceState); ZXing.Net.Mobile.Forms.Android.Platform.Init(); //Initializing User Dialogs UserDialogs.Init(this); // Initializing FFImageLoading CachedImageRenderer.Init(false); //thinh nnd if ((int)Build.VERSION.SdkInt >= 23) { CheckAndRequestRequiredPermissions(); } var host = App.BuildHost(typeof(DependencyInjection.DroidServiceModule).Assembly) .UseContentRoot(System.Environment.GetFolderPath( System.Environment.SpecialFolder.Personal)).Build(); try { Console.WriteLine("CRASH_TEST - loading c++_shared"); JavaSystem.LoadLibrary("c++_shared"); } catch (Java.Lang.UnsatisfiedLinkError e) { Console.WriteLine("CRASH_TEST - " + e.Message); Console.WriteLine("CRASH_TEST - lgnustl_shared"); JavaSystem.LoadLibrary("gnustl_shared"); } Console.WriteLine("CRASH_TEST - indy"); JavaSystem.LoadLibrary("indy"); Console.WriteLine("CRASH_TEST - indy-loaded"); _application = host.Services.GetRequiredService <App>(); WireUpLongRunningTask(); LoadApplication(_application); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); Xamarin.FormsMaps.Init(this, savedInstanceState); NotificationCenter.CreateNotificationChannel(); LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(this.Intent); }
protected override void OnCreate(Bundle bundle) { NotificationCenter.CreateNotificationChannel(); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App(new AndroidInitializer())); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); // Must create a Notification Channel when API >= 26 // you can created multiple Notification Channels with different names. NotificationCenter.CreateNotificationChannel(); LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); // Only need to be set this manually, if you do not have a image called "Icon.png". // Notification Icon must be set for notification to appear. // NotificationCenter.NotificationIconId = Resource.Drawable.YOUR_ICON_HERE; LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); // Must create a Notification Channel when API >= 26 // you can created multiple Notification Channels with different names. NotificationCenter.CreateNotificationChannel(); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App(new AndroidInitializer())); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); NotificationCenter.CreateNotificationChannel(); UserDialogs.Init(this); HtmlLabelRenderer.Initialize(); Rg.Plugins.Popup.Popup.Init(this, bundle); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App(new AndroidInitializer())); Instance = this; NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; //Forms.SetFlags(new[] //{ // "CarouselView_Experimental", // "IndicatorView_Experimental", // "SwipeView_Experimental", // "CollectionView_Experimental" //}); base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true); var channel = new NotificationChannelRequest(); channel.LightColor = Android.Graphics.Color.Green; long[] vibrationPattern = { 100, 200, 300, 400, 500, 400, 300, 200, 400 }; channel.VibrationPattern = vibrationPattern; channel.LockscreenVisibility = NotificationVisibility.Public; // Must create a Notification Channel when API >= 26 NotificationCenter.CreateNotificationChannel(channel); // you can created multiple Notification Channels with different names. NotificationCenter.CreateNotificationChannel(); //For apps that target Android 5.1(API level 22) or lower, there is nothing more that needs to be done. //Apps that will run on Android 6.0(API 23 level 23) or higher should ask Run time permission checks. //Handles this Exception: Xamarin: Android: System.UnauthorizedAccessException: Access to the path is denied if (Build.VERSION.SdkInt >= BuildVersionCodes.M) { if (!(CheckPermissionGranted(Manifest.Permission.ReadExternalStorage) && !CheckPermissionGranted(Manifest.Permission.WriteExternalStorage))) { RequestPermission(); } } LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(base.Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.SetFlags("Shell_Experimental", "Visual_Experimental", "CollectionView_Experimental", "FastRenderers_Experimental"); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); // Must create a Notification Channel when API >= 26 // you can created multiple Notification Channels with different names. NotificationCenter.CreateNotificationChannel(); LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); // Must create a Notification Channel when API >= 26 // you can created multiple Notification Channels with different names. NotificationCenter.CreateNotificationChannel(new Plugin.LocalNotification.Platform.Droid.NotificationChannelRequest { Sound = Resource.Raw.good_things_happen.ToString() }); LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); global::Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState); UserDialogs.Init(this); NotificationCenter.CreateNotificationChannel(); LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(base.Intent); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Подключение службы уведомлений NotificationCenter.CreateNotificationChannel(); // Задание портретной ориентации RequestedOrientation = ScreenOrientation.Portrait; // Получение ссылки на объект string url = ""; if (this.Intent != null && this.Intent.Data != null) { url = this.Intent.Data.ToString(); } Intent intent = new Intent(this, typeof(MainActivity)); intent.PutExtra("url", url); // Сохранение ссылки в настройки, если приложение было запущено ранее if (App.Current != null) { object url_temp = ""; if (App.Current.Properties.TryGetValue("url", out url_temp)) { App.Current.Properties["url"] = url; } else { App.Current.Properties.Add("url", url); } } Thread.Sleep(1000); StartActivity(intent); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; // Регистрация плагина для получения ориентации (кажется) Plugin.CurrentActivity.CrossCurrentActivity.Current.Activity = this; base.OnCreate(savedInstanceState); // Установка портретной ориентации RequestedOrientation = ScreenOrientation.Portrait; Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); // Регистрация данных для отображения SVG CachedImageRenderer.Init(true); var ignore = typeof(SvgCachedImage); this.Window.AddFlags(WindowManagerFlags.Fullscreen); // Получение ссылки на объект string url = ""; try { if (this.Intent != null) { url = this.Intent.GetStringExtra("url").ToString(); } } catch { } // Подключение службы уведомлений NotificationCenter.CreateNotificationChannel(); LoadApplication(new App(url)); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { StatusBar.Activity = this; base.OnCreate(savedInstanceState); Forms.SetFlags("FastRenderers_Experimental"); Rg.Plugins.Popup.Popup.Init(this); Xamarin.Essentials.Platform.Init(Application); NotificationCenter.CreateNotificationChannel(); Forms.Init(this, savedInstanceState); LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(Intent); FirebasePushNotificationManager.ProcessIntent(this, Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.SetFlags("SwipeView_Experimental"); Rg.Plugins.Popup.Popup.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); //CrossCurrentActivity.Current.Init(this, savedInstanceState); CachedImageRenderer.Init(enableFastRenderer: true); CachedImageRenderer.InitImageViewHandler(); NotificationCenter.CreateNotificationChannel(); Xamarin.FormsMaps.Init(this, savedInstanceState); Instance = this; LoadApplication(new App()); NotificationCenter.NotifyNotificationTapped(Intent); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); // TODO check and remove Shell, Visual, CollectionView experimental global::Xamarin.Forms.Forms.SetFlags("MediaElement_Experimental", "FastRenderers_Experimental"); // essentials Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); global::Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState); FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true); //FFImageLoading.Forms.Platform.CachedImageRenderer.InitImageViewHandler(); // Local Notification NotificationCenter.CreateNotificationChannel(new Plugin.LocalNotification.Platform.Droid.NotificationChannelRequest { //Sound = Resource.Raw.filling_your_inbox.ToString(), Importance = NotificationImportance.Max }); NotificationCenter.NotifyNotificationTapped(Intent); // Map Xamarin.FormsMaps.Init(this, savedInstanceState); // status bar color Window.SetStatusBarColor(Android.Graphics.Color.Rgb(56, 79, 129)); LoadApplication(new App()); }
protected override void OnNewIntent(Intent intent) { NotificationCenter.NotifyNotificationTapped(intent); base.OnNewIntent(intent); }