我想知道你是否可以提供帮助,这实际上让我发疯了.我试图在Lightning演讲之后将深层链接集成到我的应用程序中,它根本不起作用.我甚至无法在聚光灯搜索中显示我的项目.
所以我创建了一个全新的项目,所有默认的New solution-> forms app.
默认应用程序是一个待办事项列表应用程序,我只添加了两个方法
AppLinkEntry GetAppLink(ItemDetailViewModel item)
{
var pageType = GetType().ToString();
var pageLink = new AppLinkEntry
{
Title = item.Title,
Description = item.Title,
AppLinkUri = new Uri(string.Format("http://website1120180225101729.azurewebsites.net/?id={0}",item.Title.Replace(" ","") ), UriKind.RelativeOrAbsolute),
IsLinkActive = true,
Thumbnail = ImageSource.FromFile("xamarin_logo.png")
};
return pageLink;
}
protected override void OnAppearing()
{
appLink = GetAppLink(BindingContext as ItemDetailViewModel);
if (appLink != null)
{
appLink.IsLinkActive = true;
Application.Current.AppLinks.RegisterLink(appLink);
}
}
Run Code Online (Sandbox Code Playgroud)
请参阅下面的打印屏幕.它注册一个应用程序链接