private void AddAndroidAppParameters_Click(object sender, EventArgs e) { // Set Android App Parameters (Optional) // If this parameters not set, the link will be opened in the browser by default. AndroidLinkInfo.Builder androidLinkInfo = new AppLinking.AndroidLinkInfo.Builder(); androidLinkInfo.SetAndroidDeepLink("applink://example/detail"); androidLinkInfo.SetFallbackUrl("ANDROID_FALLBACK_URL"); androidLinkInfo.SetMinimumVersion(2); androidLinkInfo.SetOpenType(AppLinking.AndroidLinkInfo.AndroidOpenType.CustomUrl); builder.SetAndroidLinkInfo(androidLinkInfo.Build()); FindViewById <TextView>(Resource.Id.txtLink).Text = builder.BuildAppLinking().Uri.ToString(); }
public void CreateAppLink() { builder = new AppLinking.Builder(); // Set URL Prefix builder.SetUriPrefix(Utility.UriPrefix); // Set Deep Link builder.SetDeepLink(Uri.Parse(Utility.OpenApp_Link)); //Set the link preview type. If this method is not called, the preview page with app information is displayed by default. builder.SetPreviewType(AppLinking.LinkingPreviewType.AppInfo); // Set Android link behavior (Optional) var behaviorBuilder = new AppLinking.AndroidLinkInfo.Builder(); // Set Min Version if user app's version less than version number or users direct to AppGallery behaviorBuilder.SetMinimumVersion(1); builder.SetAndroidLinkInfo(behaviorBuilder.Build()); FindViewById <TextView>(Resource.Id.txtLink).Text = builder.BuildAppLinking().Uri.ToString(); }