[英]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 . 我想通过这些链接xamarin和this 。 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.