Exemple #1
0
        public static AppLinkEntry FromUri(Uri uri)
        {
            var appEntry = new AppLinkEntry();

            appEntry.AppLinkUri = uri;
            return(appEntry);
        }
		AppLinkEntry GetAppLink(TodoItem item)
		{
			var pageType = GetType().ToString();
			var pageLink = new AppLinkEntry
			{
				Title = item.Name,
				Description = item.Notes,
				AppLinkUri = new Uri(string.Format("http://{0}/{1}?id={2}", App.AppName, pageType, WebUtility.UrlEncode(item.ID)), UriKind.RelativeOrAbsolute),
				IsLinkActive = true,
				Thumbnail = ImageSource.FromFile("monkey.png")
			};

			pageLink.KeyValues.Add("contentType", "TodoItemPage");
			pageLink.KeyValues.Add("appName", App.AppName);
			pageLink.KeyValues.Add("companyName", "Xamarin");

			return pageLink;
		}
        public static AppLinkEntry GetAppLink(this Session session)
        {
            var url = $"http://evolve.xamarin.com/session/{session.Id.ToString()}";

            var entry = new AppLinkEntry
            {
                Title = session.Title,
                Description = session.Abstract,
                AppLinkUri = new Uri(url, UriKind.RelativeOrAbsolute),
                IsLinkActive = true
            };

            if (Device.OS == TargetPlatform.iOS)
                entry.Thumbnail = ImageSource.FromFile("Icon.png");

            entry.KeyValues.Add("contentType", "Session");
            entry.KeyValues.Add("appName", "Evolve16");
            entry.KeyValues.Add("companyName", "Xamarin");

            return entry;
        }
		public static AppLinkEntry FromUri(Uri uri)
		{
			var appEntry = new AppLinkEntry();
			appEntry.AppLinkUri = uri;
			return appEntry;
		}