Пример #1
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            MixpanelTweaks.Register(typeof(AppTweaks));
            Mixpanel.SharedInstanceWithToken("<YOUR TOKEN>");
            Mixpanel.SharedInstance.Track("Launch");

            return(true);
        }
Пример #2
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method
            Xamarin.IQKeyboardManager.SharedManager.ShouldResignOnTouchOutside = true;
            Xamarin.IQKeyboardManager.SharedManager.EnableAutoToolbar          = true;
            ImageService.Instance.Config.SchedulerMaxParallelTasks             = 6;

            var manager = BITHockeyManager.SharedHockeyManager;

            manager.Configure("8a31b849e71547c7b6137a87d58fdb09");
            manager.StartManager();
            Settings.AppID       = ConstantsHelper.FB_ApplicationID; //"469763806538563";
            Settings.DisplayName = ConstantsHelper.AppName;          //"Fanword";

            MixpanelTweaks.Register(typeof(AppTweaks));
            Mixpanel.SharedInstanceWithToken(MIXPANEL_TOKEN);
            Mixpanel.SharedInstance.Track("Launch");


            CrossPushNotifications.Current.Configure(ServiceApiBase.HubName, ServiceApiBase.AzureConnectionString, new[] { "fanword" }, 0);
            CrossPushNotifications.Current.PushNotificationClicked += (sender, e) =>
            {
                if (UIApplication.SharedApplication.ApplicationState == UIApplicationState.Inactive && MainViewController.Instance?.NavigationController != null)
                {
                    // clicked on notification from background
                    var notification = (e as PushNotificationItem);
                    Navigator.HandleNotificationTap(MainViewController.Instance.NavigationController, notification.MetaData, notification.Title, notification.Message);
                }
                else if (UIApplication.SharedApplication.ApplicationState == UIApplicationState.Active)
                {
                    // Update badge
                    MainViewController.Instance?.GetNotifications();
                }
                else
                {
                    // app closed
                    ClickedNotification = (e as PushNotificationItem);
                }
            };

            return(true);
        }