public override void PerformActionForShortcutItem(UIApplication application, 
			UIApplicationShortcutItem shortcutItem, 
			UIOperationHandler completionHandler)
        {
            // Store the fact that we've signed in. This is where the shortcuts get their notifications.
            // Look at the Info.plist file for more info
        }
Ejemplo n.º 2
0
 // if app is already running
 public override void PerformActionForShortcutItem (UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
 {
     Console.WriteLine ("dddddddd PerformActionForShortcutItem");
     // Perform action
     var handled = HandleShortcutItem(shortcutItem);
     completionHandler(handled);
 }
Ejemplo n.º 3
0
 public override void PerformActionForShortcutItem(UIApplication application,
                                                   UIApplicationShortcutItem shortcutItem,
                                                   UIOperationHandler completionHandler)
 {
     // Store the fact that we've signed in. This is where the shortcuts get their notifications.
     // Look at the Info.plist file for more info
 }
Ejemplo n.º 4
0
 public override void PerformActionForShortcutItem(
     UIApplication application,
     UIApplicationShortcutItem shortcutItem,
     UIOperationHandler completionHandler)
 {
     if (!_preventSecondaryActivationHandling)
     {
         OnLaunched(new LaunchActivatedEventArgs(ActivationKind.Launch, shortcutItem.Type));
     }
     _preventSecondaryActivationHandling = false;
 }
Ejemplo n.º 5
0
        // if app is already running
        public override void PerformActionForShortcutItem(
            UIApplication application,
            UIApplicationShortcutItem shortcutItem,
            UIOperationHandler completionHandler)
        {
            Console.WriteLine("PerformActionForShortcutItem");
            // Perform action
            var handled = HandleShortcutItem(shortcutItem);

            completionHandler(handled);
        }
Ejemplo n.º 6
0
        public void CreateAndSaveWithCompletionHandler(UIOperationHandler completionHandler)
        {
            List list = new List();

            list.Color = Color.Value;

            ListDocument document = new ListDocument(Url);

            document.List = list;

            document.Save(Url, UIDocumentSaveOperation.ForCreating, completionHandler);
        }
Ejemplo n.º 7
0
        // Called when the user activates your application by selecting a shortcut on the home screen, except when
        // WillFinishLaunching (UIApplication, NSDictionary) or FinishedLaunching (UIApplication, NSDictionary) returns `false`.
        // You should handle the shortcut in those callbacks and return `false` if possible. In that case, this
        // callback is used if your application is already launched in the background.
        public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            bool handledShortCutItem = HandleShortCutItem(shortcutItem);

            completionHandler(handledShortCutItem);
        }
Ejemplo n.º 8
0
		public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
		{
			Current.Services?.InvokeLifecycleEvents<iOSLifecycle.PerformActionForShortcutItem>(del => del(application, shortcutItem, completionHandler));
		}
Ejemplo n.º 9
0
        public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            analyticsService.TrackAppShortcut(shortcutItem.LocalizedTitle);
            var url = shortcutItem.UserInfo[nameof(ApplicationShortcut.Url)].ToString();

            navigationService.Navigate(url);
        }
Ejemplo n.º 10
0
 // if app is already running
 public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
 {
     // Perform action
     completionHandler(HandleShortcutItem(shortcutItem));
 }
Ejemplo n.º 11
0
        public static void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            if (shortcutItem.Type == AppActions.Type)
            {
                var appAction = shortcutItem.ToAppAction();

                AppActions.InvokeOnAppAction(application, shortcutItem.ToAppAction());
            }
        }
Ejemplo n.º 12
0
 // if app is already running
 public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
 {
     // Perform action
     completionHandler(HandleShortcutItem(shortcutItem));
 }
Ejemplo n.º 13
0
        public void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            if (shortcutItem.Type == ShortcutType)
            {
                var appAction = shortcutItem.ToAppAction();

                AppActionActivated?.Invoke(null, new AppActionEventArgs(appAction));
            }
        }
Ejemplo n.º 14
0
 public override void PerformActionForShortcutItem (UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
 {
     var quickActions = ServiceContainer.Resolve<QuickActions> ();
     completionHandler (quickActions.HandleShortcut (shortcutItem));
 }
        public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            base.PerformActionForShortcutItem(application, shortcutItem, completionHandler);

            if (_useDefaultConfiguration)
            {
                Xamarin.Essentials.Platform.PerformActionForShortcutItem(application, shortcutItem, completionHandler);
            }
        }
Ejemplo n.º 16
0
 public override void PerformActionForShortcutItem(UIApplication application,
                                                   UIApplicationShortcutItem shortcutItem,
                                                   UIOperationHandler completionHandler) =>
 OnLaunched(new LaunchActivatedEventArgs(ActivationKind.Launch, shortcutItem.Type));
        public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            base.PerformActionForShortcutItem(application, shortcutItem, completionHandler);

            Console.WriteLine("Action");
        }
Ejemplo n.º 18
0
        public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            analyticsService.ApplicationShortcut.Track(shortcutItem.LocalizedTitle);

            var key = new NSString(nameof(ApplicationShortcut.Type));

            if (!shortcutItem.UserInfo.ContainsKey(key))
            {
                return;
            }

            var shortcutNumber = shortcutItem.UserInfo[key] as NSNumber;

            if (shortcutNumber == null)
            {
                return;
            }

            var shortcutType = (ShortcutType)(int)shortcutNumber;

            switch (shortcutType)
            {
            case ShortcutType.ContinueLastTimeEntry:
                navigationService.Navigate <MainViewModel>();
                var interactorFactory = IosDependencyContainer.Instance.InteractorFactory;
                if (interactorFactory == null)
                {
                    return;
                }
                IDisposable subscription = null;
                subscription = interactorFactory
                               .ContinueMostRecentTimeEntry()
                               .Execute()
                               .Subscribe(_ =>
                {
                    subscription.Dispose();
                    subscription = null;
                });
                break;

            case ShortcutType.Reports:
                navigationService.Navigate <ReportsViewModel>();
                break;

            case ShortcutType.StartTimeEntry:
                navigationService.Navigate <MainViewModel>();
                navigationService.Navigate <StartTimeEntryViewModel>();
                break;

            case ShortcutType.Calendar:
                navigationService.Navigate <CalendarViewModel>();
                break;
            }
        }
Ejemplo n.º 19
0
		// if app is already running
		public override void PerformActionForShortcutItem (UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
		{
			var handled = HandleShortcutItem(shortcutItem);
			completionHandler(handled);
		}
Ejemplo n.º 20
0
        public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            IosDependencyContainer.Instance
            .AnalyticsService
            .ApplicationShortcut
            .Track(shortcutItem.LocalizedTitle);

            var shortcutUrlKey = new NSString(nameof(ApplicationShortcut.Url));

            if (!shortcutItem.UserInfo.ContainsKey(shortcutUrlKey))
            {
                return;
            }

            var shortcutUrlString = shortcutItem.UserInfo[shortcutUrlKey] as NSString;

            if (shortcutUrlString == null)
            {
                return;
            }

            var shortcutUrl = new NSUrl(shortcutUrlString);

            handleDeeplink(shortcutUrl);
        }
Ejemplo n.º 21
0
        public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, [BlockProxy(typeof(NIDUIOperationHandler))] UIOperationHandler completionHandler)
        {
            //Dont call base method
            //base.PerformActionForShortcutItem(application, shortcutItem, completionHandler);
            var uri = Plugin.AppShortcuts.iOS.ArgumentsHelper.GetUriFromApplicationShortcutItem(shortcutItem);

            if (uri != null)
            {
                Xamarin.Forms.Application.Current.SendOnAppLinkRequestReceived(uri);
            }
        }
Ejemplo n.º 22
0
 public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
 => Xamarin.Essentials.Platform.PerformActionForShortcutItem(application, shortcutItem, completionHandler);
Ejemplo n.º 23
0
        // Shourcut Plugin.AppShortcut
        public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            var uri = Plugin.AppShortcuts.iOS.ArgumentsHelper.GetUriFromApplicationShortcutItem(shortcutItem);

            if (uri != null)
            {
                Xamarin.Forms.Application.Current.SendOnAppLinkRequestReceived(uri);
            }
        }
Ejemplo n.º 24
0
		public override async void PerformActionForShortcutItem (UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
		{
			try {
				await HandleShortcutItemAsync (shortcutItem);
			} catch (Exception ex) {
				Log.Error (ex);
			}
			try {
				completionHandler (true);
			} catch (Exception ex) {
				Log.Error (ex);
			}
		}
Ejemplo n.º 25
0
        public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            ShortcutAction?action = ConvertShortcutItem(shortcutItem);

            if (action != null)
            {
                HandleShortcutAction(action.Value);
            }
        }
Ejemplo n.º 26
0
        public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            analyticsService.TrackAppShortcut(shortcutItem.LocalizedTitle);

            var shortcutType = (ShortcutType)(int)(NSNumber)shortcutItem.UserInfo[nameof(ApplicationShortcut.Type)];

            switch (shortcutType)
            {
            case ShortcutType.ContinueLastTimeEntry:
                var interactorFactory = Mvx.Resolve <IInteractorFactory>();
                if (interactorFactory == null)
                {
                    return;
                }
                IDisposable subscription = null;
                subscription = interactorFactory
                               .ContinueMostRecentTimeEntry()
                               .Execute()
                               .Subscribe(_ =>
                {
                    subscription.Dispose();
                    subscription = null;
                });
                break;

            case ShortcutType.Reports:
                navigationService.Navigate <ReportsViewModel>();
                break;

            case ShortcutType.StartTimeEntry:
                navigationService.Navigate <StartTimeEntryViewModel>();
                break;
            }
        }
Ejemplo n.º 27
0
		//for when a user chooses a quick launch shortcut
		public override void PerformActionForShortcutItem (UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
		{
			completionHandler (ShortcutManager.HandleShortcut (application, shortcutItem));
		}