Exemplo n.º 1
0
        private static void DisplayAlert(AGCResolvedLink link)
        {
            string appLinkInfo = $"App Link: {link?.DeepLink}";

            var alert         = UIAlertController.Create("App Link Received", appLinkInfo, UIAlertControllerStyle.Alert);
            var defaultAction = UIAlertAction.Create("OK", UIAlertActionStyle.Default, null);

            alert.AddAction(defaultAction);

            (UIApplication.SharedApplication.KeyWindow.RootViewController as UIViewController)?.PresentViewController(alert, true, null);
        }
Exemplo n.º 2
0
        private static void DisplayAlert(AGCResolvedLink link)
        {
            string appLinkInfo = $"App Link: {link?.DeepLink} \n Time: {link?.ClickTime}";

            string campaignInfo = $"Campaign Name: {link?.CampaignName} \n Campaign Medium: {link?.CampaignMedium} \n Campaign Source: {link?.CampaignSource}";

            string socialInfo = $"Social Title: {link?.SocialTitle} \n Social Description: {link?.SocialDescription} \n Social ImageUrl: {link?.SocialImageUrl}";

            var alert         = UIAlertController.Create("App Link Received", appLinkInfo + "\n" + campaignInfo + "\n" + socialInfo, UIAlertControllerStyle.Alert);
            var defaultAction = UIAlertAction.Create("OK", UIAlertActionStyle.Default, null);

            alert.AddAction(defaultAction);

            (UIApplication.SharedApplication.KeyWindow.RootViewController as ViewController)?.PresentViewController(alert, true, null);
        }
Exemplo n.º 3
0
        private void AppLinkReceivedCallback(AGCResolvedLink link, NSError error)
        {
            if (error != null)
            {
                Console.WriteLine("Error occured: " + error.Description);
            }

            if (link != null)
            {
                //Display alert to show app link detail
                DisplayAlert(link);

                Console.WriteLine("App Link handled");
            }
        }