public override bool OpenUrl(UIApplication application, NSUrl receivedurl, string sourceApplication, NSObject annotation) { AsNumAssemblyHelper.HoldAssembly(); global::Xamarin.Forms.Forms.Init(); FloatingActionButtonRenderer.InitRenderer(); OxyPlot.Xamarin.Forms.Platform.iOS.PlotViewRenderer.Init(); DependencyService.Register <ToastNotification>(); Plugin.Toasts.ToastNotification.Init(); //global::Xamarin.FormsMaps.Init(); FormsPlugin.Iconize.iOS.IconControls.Init(); var dummy = new FFImageLoading.Forms.Touch.CachedImageRenderer(); FFImageLoading.Forms.Touch.CachedImageRenderer.Init(); FormsPlugin.Iconize.iOS.IconControls.Init(); Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule()); Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.IoniconsModule()); ShapeRenderer.Init(); ImageCircleRenderer.Init(); string url = receivedurl.ToString(); //string[] values = Intent.DataString.ToString().Split('/'); // string inttype = values[values.Length - 1]; string integrationtype = url.Trim().Contains("google_fit") ? "2" : "1"; string integration = url.Substring(url.IndexOf("code=") + 4 + 1); //LoadApplication(new App(integrationtype, integration)); LoadApplication(new App(integrationtype, integration)); /* now store the url somewhere in the app’s context. The url is in the url NSUrl object. The data is in url.Host if the link as a scheme as superduperapp://something_interesting */ return(true); }
protected override async void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.Window.RequestFeature(WindowFeatures.ActionBar); // Name of the MainActivity theme you had there before. // Or you can use global::Android.Resource.Style.ThemeHoloLight base.SetTheme(Resource.Style.MainTheme); base.OnCreate(bundle); AsNumAssemblyHelper.HoldAssembly(); global::Xamarin.Forms.Forms.Init(this, bundle); CachedImageRenderer.Init(true); var ignore = typeof(SvgCachedImage); OneSignal.Current.StartInit("0c5b7cb6-a33d-453e-ada0-2c54d17bd7ba") .EndInit(); OneSignal.Current.RegisterForPushNotifications(); await CrossMedia.Current.Initialize(); CrossCurrentActivity.Current.Init(this, bundle); LoadApplication(new App()); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { AsNumAssemblyHelper.HoldAssembly(); global::Xamarin.Forms.Forms.Init(); 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) { Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); global::Xamarin.Forms.Forms.Init(); //SQLitePCL.CurrentPlatform.Init(); AsNumAssemblyHelper.HoldAssembly(); LoadApplication(new goParty.App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); AsNumAssemblyHelper.HoldAssembly(); 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) { TopTabbedRenderer.Init(); AsNumAssemblyHelper.HoldAssembly(); global::Xamarin.Forms.Forms.Init(); global::ZXing.Net.Mobile.Forms.iOS.Platform.Init(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); CrossCurrentActivity.Current.Init(this, bundle); CustomizeTabs(); AsNumAssemblyHelper.HoldAssembly(); MobileBarcodeScanner.Initialize(this.Application); 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(); AsNumAssemblyHelper.HoldAssembly(); CachedImageRenderer.Init(); var ignore = typeof(SvgCachedImage); OneSignal.Current.StartInit("0c5b7cb6-a33d-453e-ada0-2c54d17bd7ba") .EndInit(); OneSignal.Current.RegisterForPushNotifications(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle bundle) { //TabLayoutResource = Resource.Layout.Tabbar; //ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); AsNumAssemblyHelper.HoldAssembly(); //UserDialogs.Init(this); UserDialogs.Init(() => (Activity)this); CrossCurrentActivity.Current.Init(this, bundle); Rg.Plugins.Popup.Popup.Init(this, bundle); Forms.SetFlags("FastRenderers_Experimental"); FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true); Forms.Init(this, bundle); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); AsNumAssemblyHelper.HoldAssembly(); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App()); GcmClient.CheckDevice(this); GcmClient.CheckManifest(this); //Call to register GcmClient.Register(this, GcmBroadcastReceiver.SENDER_IDS); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.Window.RequestFeature(WindowFeatures.ActionBar); // Name of the MainActivity theme you had there before. // Or you can use global::Android.Resource.Style.ThemeHoloLight base.SetTheme(Resource.Style.MainTheme); base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); AsNumAssemblyHelper.HoldAssembly(); ImageCircleRenderer.Init(); Downloaded(); ZXing.Net.Mobile.Forms.Android.Platform.Init(); LoadApplication(new App()); }
protected override void OnCreate(Bundle bundle) { try { TabLayoutResource = 2130903113; // Resource.Layout.Tabbar; ToolbarResource = 2130903114; // Resource.Layout.Toolbar; base.OnCreate(bundle); AsNumAssemblyHelper.HoldAssembly(); //FFImageLoading.Forms.Touch.CachedImageRenderer.Init(); // global::Xamd.ImageCarousel.Forms.Plugin.Droid.ImageCarouselRenderer.Init(); global::Xamarin.Forms.Forms.Init(this, bundle); global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, bundle); OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init(); ImageCircleRenderer.Init(); // CrossCurrentActivity.Current.Init(this, bundle); //FormsPlugin.Iconize.Droid.IconControls.Init(Resource.Id.toolbar); FormsPlugin.Iconize.Droid.IconControls.Init(); FFImageLoading.Forms.Droid.CachedImageRenderer.Init(true); if (Intent.Data != null) { if (Intent.Data.EncodedAuthority.ToString() == "tracker") { string url = Intent.DataString.ToString(); //string[] values = Intent.DataString.ToString().Split('/'); // string inttype = values[values.Length - 1]; string integrationtype = url.Trim().Contains("google_fit") ? "2" : "1"; string integration = url.Substring(url.IndexOf("code=") + 4 + 1); LoadApplication(new App(integrationtype, integration)); } } else { LoadApplication(new App()); } //Log.Debug(TAG, "InstanceID token: " + FirebaseInstanceId.Instance.Token); //ConfigureFireBase(); } catch (System.Exception ex) { Message a = new Message(); a.LongAlert(ex.ToString()); } }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; //Adapt Initialization var permissions = new Permissions(this); _PresentationFactory = new PresentationFactory(ApplicationContext, permissions); base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); Xamarin.FormsMaps.Init(this, bundle); PullToRefreshLayoutRenderer.Init(); global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, bundle); var loginProvider = (DroidLoginProvider)DependencyService.Get <ILoginProvider>(); CarouselViewRenderer.Init(); ImageCircleRenderer.Init(); loginProvider.Init(this); AsNumAssemblyHelper.HoldAssembly(); var width = Resources.DisplayMetrics.WidthPixels; var height = Resources.DisplayMetrics.HeightPixels; var density = Resources.DisplayMetrics.Density; App.ScreenWidth = (width - 0.5f) / density; App.ScreenHeight = (height - 0.5f) / density; try { LoadApplication(new goParty.App()); Window.SetStatusBarColor(Android.Graphics.Color.Argb(255, 0, 0, 0)); } catch (Exception ex) { Console.WriteLine($"[Login] Error = {ex.Message}"); } }
// // 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) { AsNumAssemblyHelper.HoldAssembly(); global::Xamarin.Forms.Forms.Init(); FloatingActionButtonRenderer.InitRenderer(); OxyPlot.Xamarin.Forms.Platform.iOS.PlotViewRenderer.Init(); DependencyService.Register <ToastNotification>(); Plugin.Toasts.ToastNotification.Init(); //global::Xamarin.FormsMaps.Init(); FormsPlugin.Iconize.iOS.IconControls.Init(); var dummy = new FFImageLoading.Forms.Touch.CachedImageRenderer(); FFImageLoading.Forms.Touch.CachedImageRenderer.Init(); FormsPlugin.Iconize.iOS.IconControls.Init(); Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule()); Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.IoniconsModule()); ShapeRenderer.Init(); ImageCircleRenderer.Init(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle savedInstanceState) { FormsAppCompatActivity.ToolbarResource = Resource.Layout.toolbar; FormsAppCompatActivity.TabLayoutResource = Resource.Layout.tabs; base.OnCreate(savedInstanceState); MainActivity.current = this; CrossMedia.Current.Initialize(); Forms.Init(this, savedInstanceState); FormsMaps.Init(this, savedInstanceState); AndroidAppLinks.Init(this); Toolkit.Init(); AsNumAssemblyHelper.HoldAssembly(); // Image caching package CachedImageRenderer.Init(); UserDialogs.Init(this); // Check and register Finger Scan if available CheckFingerPrint(); PullToRefreshLayoutRenderer.Init(); https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout typeof(Color).GetProperty("Accent", BindingFlags.Public | BindingFlags.Static).SetValue(null, Color.FromHex("#757575")); ImageCircle.Forms.Plugin.Droid.ImageCircleRenderer.Init(); // https://github.com/jamesmontemagno/ImageCirclePlugin // ZXing.Net.Mobile.Forms.Android.Platform.Init(); // https://components.xamarin.com/view/zxing.net.mobile #if ENABLE_TEST_CLOUD //Mapping StyleID to element content descriptions Xamarin.Forms.Forms.ViewInitialized += (object sender, Xamarin.Forms.ViewInitializedEventArgs e) => { if (!string.IsNullOrWhiteSpace(e.View.StyleId)) { e.NativeView.ContentDescription = e.View.StyleId; } }; #endif #if !ENABLE_TEST_CLOUD InitializeHockeyApp(); #endif LoadApplication(new App()); var gpsAvailable = IsPlayServicesAvailable(); Settings.Current.PushNotificationsEnabled = gpsAvailable; if (gpsAvailable) { client = new GoogleApiClient.Builder(this) // http://stackoverflow.com/questions/33391731/how-to-get-googleapiclient-in-xamarin .AddApi(AppIndex.API) // for app indexing support .Build(); } MessagingService.Current.Subscribe <string>(MessageKeys.LoggedIn, async(m, role) => { RegisterWithGCM(); }); OnNewIntent(Intent); if (!Settings.Current.PushNotificationsEnabled) { return; } #if ENABLE_TEST_CLOUD #else RegisterWithGCM(); #endif DataRefreshService.ScheduleRefresh(this); CheckForUpdates(); //InitlizeSync(); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { var tint = UIColor.FromRGB(118, 53, 235); UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(250, 250, 250); //bar background UINavigationBar.Appearance.TintColor = tint; //Tint color of button items UIBarButtonItem.Appearance.TintColor = tint; //Tint color of button items UITabBar.Appearance.TintColor = tint; UISwitch.Appearance.OnTintColor = tint; UIAlertView.Appearance.TintColor = tint; UIView.AppearanceWhenContainedIn(typeof(UIAlertController)).TintColor = tint; UIView.AppearanceWhenContainedIn(typeof(UIActivityViewController)).TintColor = tint; UIView.AppearanceWhenContainedIn(typeof(SLComposeViewController)).TintColor = tint; #if !ENABLE_TEST_CLOUD if (!string.IsNullOrWhiteSpace(ApiKeys.HockeyAppiOS) && ApiKeys.HockeyAppiOS != nameof(ApiKeys.HockeyAppiOS)) { var manager = BITHockeyManager.SharedHockeyManager; manager.Configure(ApiKeys.HockeyAppiOS); // Disable update manager manager.DisableUpdateManager = false; manager.DisableMetricsManager = false; manager.StartManager(); manager.Authenticator.AuthenticateInstallation(); // This line is obsolete in crash only builds } #endif Forms.Init(); FormsMaps.Init(); Toolkit.Init(); CrossMedia.Current.Initialize(); AsNumAssemblyHelper.HoldAssembly(); // Image caching package CachedImageRenderer.Init(); // https://github.com/daniel-luberda/DLToolkit.Forms.Controls/tree/master/TagEntryView AppIndexing.SharedInstance.RegisterApp(618319027); // https://components.xamarin.com/gettingstarted/googleiosappindexing //ZXing.Net.Mobile.Forms.iOS.Platform.Init(); // Code for starting up the Xamarin Test Cloud Agent #if ENABLE_TEST_CLOUD Xamarin.Calabash.Start(); // https://developer.xamarin.com/guides/testcloud/calabash/introduction-to-calabash/ // Mapping StyleId to iOS Labels Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) => { if (null != e.View.StyleId) { e.NativeView.AccessibilityIdentifier = e.View.StyleId; } }; #endif SetMinimumBackgroundFetchInterval(); // Random Inits for Linking out. Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); // Initialization only needed on iOS for offline Sync SQLitePCL.CurrentPlatform.Init(); // https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-offline-data // Excude for iOS Plugin.Share.ShareImplementation.ExcludedUIActivityTypes = new List <NSString> // https://github.com/jguertl/SharePlugin { UIActivityType.PostToFacebook, UIActivityType.AssignToContact, UIActivityType.OpenInIBooks, UIActivityType.PostToVimeo, UIActivityType.PostToFlickr, UIActivityType.SaveToCameraRoll }; ImageCircle.Forms.Plugin.iOS.ImageCircleRenderer.Init(); // https://github.com/jamesmontemagno/ImageCirclePlugin // ZXing.Net.Mobile.Forms.iOS.Platform.Init(); // https://components.xamarin.com/view/zxing.net.mobile NonScrollableListViewRenderer.Initialize(); SelectedTabPageRenderer.Initialize(); TextViewValue1Renderer.Init(); PullToRefreshLayoutRenderer.Init(); // https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout LoadApplication(new App()); // Process any potential notification data from launch ProcessNotification(options); NSNotificationCenter.DefaultCenter.AddObserver(UIApplication.DidBecomeActiveNotification, DidBecomeActive); MessagingService.Current.Subscribe <string>(MessageKeys.LoggedIn, async(m, role) => { var push = DependencyService.Get <IPushNotifications>(); await push.RegisterForNotifications(); }); return(base.FinishedLaunching(app, options)); //bool alertsAllowed = false; //UNUserNotificationCenter.Current.GetNotificationSettings((settings) => //{ // alertsAllowed = (settings.AlertSetting == UNNotificationSetting.Enabled); // if (!alertsAllowed) // { // // Request notification permissions from the user // UNUserNotificationCenter.Current.RequestAuthorization(UNAuthorizationOptions.Alert, (approved, err) => // { // // Handle approval // var push = DependencyService.Get<IPushNotifications>(); // push?.RegisterForNotifications(); // }); // } //}); // return ret; }