public static void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
        {
            if (shortcutItem.Type == AppActions.Type)
            {
                var appAction = shortcutItem.ToAppAction();

                AppActions.InvokeOnAppAction(application, shortcutItem.ToAppAction());
            }
        }
Example #2
0
        static void CheckAppActions(AndroidIntent intent)
        {
            if (intent?.Action == Intent.ActionAppAction)
            {
                var appAction = intent.ToAppAction();

                if (!string.IsNullOrEmpty(appAction?.Id))
                {
                    AppActions.InvokeOnAppAction(Platform.CurrentActivity, appAction);
                }
            }
        }
Example #3
0
        static void CheckAppActions(AndroidIntent intent)
        {
            if (intent?.Action == Intent.ActionAppAction && !intent.GetBooleanExtra(AppActions.extraAppActionHandled, false))
            {
                // prevent launch intent getting handled on activity resume
                intent.PutExtra(AppActions.extraAppActionHandled, true);

                var appAction = intent.ToAppAction();

                if (!string.IsNullOrEmpty(appAction?.Id))
                {
                    AppActions.InvokeOnAppAction(Platform.CurrentActivity, appAction);
                }
            }
        }
Example #4
0
        internal static async Task OnLaunched(LaunchActivatedEventArgs e)
        {
            if (e?.Arguments?.StartsWith(appActionPrefix) ?? false)
            {
                var id = ArgumentsToId(e.Arguments);

                if (!string.IsNullOrEmpty(id))
                {
                    var actions = await PlatformGetAsync();

                    var appAction = actions.FirstOrDefault(a => a.Id == id);

                    if (appAction != null)
                    {
                        AppActions.InvokeOnAppAction(null, appAction);
                    }
                }
            }
        }
Example #5
0
 public static async void OnLaunched(LaunchActivatedEventArgs e)
 => await AppActions.OnLaunched(e);