protected override void OnCreate(Bundle savedInstanceState) { ButtonCircleRenderer.Init(); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); string fileName = "VocalDB.db"; string folderPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData); var t2st = Directory.GetFiles(folderPath); string folderPath2 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData); var tf2st = Directory.GetFiles(folderPath2); string folderPath32 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); var tf2sft = Directory.GetFiles(folderPath32); string dbPath = FileAccessHelper.GetLocalFilePath("VocalDB.db"); Xamarin.Forms.Forms.SetFlags(new string[] { "Expander_Experimental", "Shapes_Experimental" }); string completePath = Path.Combine(folderPath, fileName); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); if (File.Exists(completePath)) { var anothertest = Assets.GetLocales(); var test = Assets.Class; } LoadApplication(new App(dbPath)); }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected override void OnLaunched(LaunchActivatedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; ButtonCircleRenderer.Init(); Xamarin.Forms.Forms.Init(e); if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } // Ensure the current window is active Window.Current.Activate(); }
// This is the main entry point of the application. static void Main(string[] args) { // if you want to use a different Application Delegate class from "AppDelegate" // you can specify it here. ButtonCircleRenderer.Init(); UIApplication.Main(args, null, "AppDelegate"); }
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); Xamarin.FormsMaps.Init(this, savedInstanceState); // for maps to work ButtonCircleRenderer.Init(); // for circle buttons //for local sqlite database string dbName = "address_db.sqlite"; string folderPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); string fullPath = Path.Combine(folderPath, dbName); LoadApplication(new App(fullPath)); //for local notifications CreateNotificationFromIntent(Intent); MessagingCenter.Subscribe <StartLongRunningTaskMessage>(this, "StartLongRunningTaskMessage", message => { var intent = new Intent(this, typeof(LongRunningTaskService)); StartService(intent); }); MessagingCenter.Subscribe <StopLongRunningTaskMessage>(this, "StopLongRunningTaskMessage", message => { var intent = new Intent(this, typeof(LongRunningTaskService)); StopService(intent); }); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { if (UIDevice.CurrentDevice.CheckSystemVersion(10, 0)) { // Ask the user for permission to get notifications on iOS 10.0+ UNUserNotificationCenter.Current.RequestAuthorization( UNAuthorizationOptions.Alert | UNAuthorizationOptions.Badge | UNAuthorizationOptions.Sound, (approved, error) => { }); // Watch for notifications while app is active UNUserNotificationCenter.Current.Delegate = new UserNotificationCenterDelegate(); } else if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { // Ask the user for permission to get notifications on iOS 8.0+ var settings = UIUserNotificationSettings.GetSettingsForTypes( UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, new NSSet()); UIApplication.SharedApplication.RegisterUserNotificationSettings(settings); } Rg.Plugins.Popup.Popup.Init(); Xamarin.Forms.Forms.Init(); ButtonCircleRenderer.Init(); UINavigationBar.Appearance.TintColor = Color.White.ToUIColor(); //to change navigation icon color to white UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes() { TextColor = UIColor.White }); //to navigation change text color to white https://forums.xamarin.com/discussion/19277/how-to-change-xamarin-form-navigationpage-title-color LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); Xamarin.FormsGoogleMaps.Init("AIzaSyBOF7sekEfDBMpyxEC7OC2_BQptJ87SWjo"); ButtonCircleRenderer.Init(); ImageCircleRenderer.Init(); //CLLocationManager locationmanager = new CLLocationManager(); //locationmanager.RequestWhenInUseAuthorization(); var cv = typeof(Xamarin.Forms.CarouselView); var assembly = Assembly.Load(cv.FullName); LoadApplication(new App()); // Register for push notifications. if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { var pushSettings = UIUserNotificationSettings.GetSettingsForTypes( UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, new NSSet()); UIApplication.SharedApplication.RegisterUserNotificationSettings(pushSettings); UIApplication.SharedApplication.RegisterForRemoteNotifications(); } else { UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound; UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationTypes); } return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; ButtonCircleRenderer.Init(); base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App()); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); FFImageLoading.Forms.Platform.CachedImageRenderer.Init(); ButtonCircleRenderer.Init(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); ButtonCircleRenderer.Init(); UserDialogs.Init(this); LoadApplication(new App()); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); global::ZXing.Net.Mobile.Forms.iOS.Platform.Init(); Xam.Plugin.iOS.PopupEffect.Init(); ButtonCircleRenderer.Init(); ProgressRingRenderer.Init(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Rg.Plugins.Popup.Popup.Init(this, savedInstanceState); Xamarin.Forms.Forms.Init(this, savedInstanceState); ButtonCircleRenderer.Init(); LoadApplication(new App()); Window.SetStatusBarColor(Android.Graphics.Color.ParseColor("#D32F2F")); //changes top color }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); LibVLCSharpFormsRenderer.Init(); global::Xamarin.Forms.Forms.Init(this, bundle); FFImageLoading.Forms.Platform.CachedImageRenderer.Init(false); ButtonCircleRenderer.Init(); LoadApplication(new App()); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Plugin.InputKit.Platforms.Droid.Config.Init(this, savedInstanceState); //custom added Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); ButtonCircleRenderer.Init(); LoadApplication(new App()); }
public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions) { global::Xamarin.Forms.Forms.Init(); ButtonCircleRenderer.Init(); CachedImageRenderer.Init(); ImageCircleRenderer.Init(); LoadApplication(new App(new iOSInitializer())); FormsPlugin.Iconize.iOS.IconControls.Init(); Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule()); return(base.FinishedLaunching(uiApplication, launchOptions)); }
protected override void OnCreate(Bundle savedInstanceState) { //SetTheme(Resource.Style.MainTheme); // <-- Added TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); // Initializing FFImageLoading FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true); Forms.SetFlags("FastRenderers_Experimental", "CollectionView_Experimental", "Expander_Experimental"); HtmlLabelRenderer.Initialize(); ZXing.Net.Mobile.Forms.Android.Platform.Init(); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, savedInstanceState); Xamarin.FormsMaps.Init(this, savedInstanceState); TouchEffectPreserver.Preserve(); // Initializing Popups Rg.Plugins.Popup.Popup.Init(this, savedInstanceState); //CardsView PanCardView.Droid.CardsViewRenderer.Preserve(); CarouselViewRenderer.Init(); PayCardsRecognizerService.Initialize(this); ButtonCircleRenderer.Init(); //ACR UserDialogs initializing UserDialogs.Init(this); Lottie.Forms.Droid.AnimationViewRenderer.Init(); Stormlion.PhotoBrowser.Droid.Platform.Init(this); PancakeViewRenderer.Init(); CrossCurrentActivity.Current.Init(this, savedInstanceState); var platformConfig = new PlatformConfig { BitmapDescriptorFactory = new CachingNativeBitmapDescriptorFactory() }; Xamarin.FormsGoogleMaps.Init(this, savedInstanceState, platformConfig); CustomTabsConfiguration.CustomTabsClosingMessage = null; LoadApplication(new App()); FirebasePushNotificationManager.ProcessIntent(this, Intent); Window.SetSoftInputMode(Android.Views.SoftInput.AdjustResize); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.SetFlags("FastRenderers_Experimental"); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App(new AndroidInitializer())); ButtonCircleRenderer.Init(); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); // Code for starting up the Xamarin Test Cloud Agent #if DEBUG Xamarin.Calabash.Start(); #endif AnimationViewRenderer.Init(); ButtonCircleRenderer.Init(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; ButtonCircleRenderer.Init(); Xamarin.Essentials.Platform.Init(this, savedInstanceState); base.OnCreate(savedInstanceState); Forms.SetFlags("CollectionView_Experimental"); CrossCurrentActivity.Current.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); Xamarin.Essentials.Platform.Init(this, bundle); global::Xamarin.Forms.Forms.Init(this, bundle); ImageCircleRenderer.Init(); ButtonCircleRenderer.Init(); LoadApplication(new App(new AndroidInitializer())); InitPowerControl(); CreateMessageCenter(); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { CachedImageRenderer.Init(); Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental"); global::Xamarin.Forms.Forms.Init(); App.ScreenHeight = (int)UIScreen.MainScreen.Bounds.Height; App.ScreenWidth = (int)UIScreen.MainScreen.Bounds.Width; LoadApplication(new App(new iOSInitializer())); CardsViewRenderer.Preserve(); Xamarin.FormsGoogleMaps.Init("AIzaSyCAXlNUOyvZuI9F4kus3dZSK_dkK4yV9ZU"); ButtonCircleRenderer.Init(); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { try { if (Intent.Extras != null) { foreach (var key in Intent.Extras.KeySet()) { var value = Intent.Extras.GetString(key); Log.Debug("FCM", "Key: {0} Value: {1}", key, value); } } ToolbarResource = Resource.Layout.Toolbar; TabLayoutResource = Resource.Layout.Tabbar; base.OnCreate(bundle); global::Xamarin.FormsMaps.Init(this, bundle); Xamarin.Forms.Forms.Init(this, bundle); global::Xamarin.FormsGoogleMaps.Init(this, bundle); ButtonCircleRenderer.Init(); var cv = typeof(Xamarin.Forms.CarouselView); var assembly = Assembly.Load(cv.FullName); LoadApplication(new App()); IsPlayServicesAvailable(); //handle any potential notifications. string jobid = Intent.GetStringExtra("jobid") ?? null; if (!string.IsNullOrEmpty(jobid)) { ((App)App.Current).OpenJobPage(jobid); } else { string jobapplicantid = Intent.GetStringExtra("jobapplicantid") ?? null; if (!string.IsNullOrEmpty(jobapplicantid)) { ((App)App.Current).OpenJobApplicantPage(jobapplicantid); } } } catch (Exception ex) { var logged = new LoggedException.LoggedException("Error in mainactivity.cs", ex); logged.LoggAPI(); } }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); Xamarin.FormsMaps.Init(); // To use maps ButtonCircleRenderer.Init(); // for circle buttons to work //for local sqlite database string dbName = "address_db.sqlite"; string folderPath = Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.Personal), "..", "Library"); string fullPath = Path.Combine(folderPath, dbName); LoadApplication(new App(fullPath)); WireUpLongRunningTask(); //backgrounding the start and stop journey return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Plugin.InputKit.Platforms.Droid.Config.Init(this, savedInstanceState); // < ---- Add here Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); Plugin.Iconize.Iconize.Init(Resource.Id.toolbar, Resource.Id.sliding_tabs); // <-- Iconize ButtonCircleRenderer.Init(); Window.AddFlags(WindowManagerFlags.Fullscreen); Window.ClearFlags(WindowManagerFlags.ForceNotFullscreen); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); Xamarin.Essentials.Platform.Init(this, bundle); LoadApplication(new App()); Xamarin.Forms.Application.Current.On <Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize); ButtonCircleRenderer.Init(); UserDialogs.Init(this); //if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) //{ // Window.DecorView.SystemUiVisibility = 0; // var statusBarHeightInfo = typeof(Xamarin.Forms.Platform.Android.FormsAppCompatActivity).GetField("_statusBarHeight", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); // statusBarHeightInfo.SetValue(this, 0); // Window.SetStatusBarColor(new Android.Graphics.Color(0, 0, 0, 255)); // Change color as required. //} }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); ButtonCircleRenderer.Init(); this.Suspending += OnSuspending; }