简体   繁体   English

如何从C#Xamarin android中的浏览器链接打开应用程序?

[英]How to open app from browser link in c# Xamarin android?

Well i tried some samples in my code to open app on clicking on an link in the browser but still i can't able to do what i want in my app. 好吧,我尝试在代码中尝试通过单击浏览器中的链接来打开应用程序中的一些示例,但仍然无法在应用程序中执行我想要的操作。 I want trough these links xamarin and this . 我想通过这些链接xamarinthis Can anyone suggest me what to do, the right way to get the soultion for my question, advance thanks. 谁能建议我该怎么做,正确回答我的问题的方式,谢谢。

My Code: 我的代码:

[IntentFilter (new[]{Intent.ActionView}, 
 Categories = new [] {Intent.CategoryDefault}, 
 DataScheme = "superduperapp",
 DataHost = "something")]

link is for example: "superduperapp://my_code_is_here" 链接例如:“ superduperapp:// my_code_is_here”

You might be missing CategoryBrowsable. 您可能缺少CategoryBrowsable。 Try this: 尝试这个:

[IntentFilter ( 
    new [] { Intent.ActionView }, 
    Categories = new [] { Intent.CategoryDefault, 
    Intent.CategoryBrowsable }, 
    DataScheme = "superduperapp", 
    DataHost = "my_code_is_here")]

Also, remember that you can easily test your intents via adb : 另外,请记住,您可以通过adb轻松测试您的意图:

adb shell am start -a android.intent.action.VIEW -d superduperapp://my_code_is_here

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 XAMARIN Android C#如何通过应用程序打开浏览器 - XAMARIN Android C# How to open browser through application 尝试使用 xamarin android 和 c# 打开默认浏览器 - Trying to open the default browser using xamarin android with c# 如何通过Web浏览器控件在新的浏览器选项卡中打开url(显示具有链接的PDF)C# - How to open url in new browser tab from Web browser control (displaying PDF having a link) c# 从已安装的应用程序C#后面的代码中打开浏览器中的链接 - Open link in browser from code behind of installed application C# 如何从C#中的xamarin uitest关闭/打开xamarin android / iOS应用程序中的网络 - How to switch off/on network in xamarin android/iOS app from xamarin uitest in C# 在C#中,如何以编程方式打开特定浏览器的链接? - In C#, how do you programmatically open a link with a specific browser? C# Xamarin 跨平台应用程序。 无论如何打开默认浏览器并自动填写用户名和密码 - C# Xamarin CrossPlatform App. Is there anyway to open default browser and automatically fill in username and password C#:从Windows桌面应用程序打开浏览器并POST到URL - C#: Open a browser and POST to a url from a windows desktop app 如何通过C#/ Xamarin中webview的链接调用whatsapp? - How to call whatsapp through a link from webview in C#/Xamarin? 如何在 C# 中的 Xamarin android 应用程序中从 google firebase 进行身份验证后获取访问令牌? - How to get Access Token after authenticating from google firebase in Xamarin android app in c#?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM