C# 在android应用程序中捕获customurlscheme?
当前使用C# 在android应用程序中捕获customurlscheme?,c#,android,xamarin,url-scheme,C#,Android,Xamarin,Url Scheme,当前使用CustomTabs/NativeUI和Xamarin.Auth通过自定义web api向Google验证Android应用程序(我无法编辑/更改web api)。是否可以拦截url(https)并在到达此url后返回到应用程序?或者,由于chrome已经打开,这对自定义选项卡不起作用 意向过滤器代码: [ IntentFilter ( actions: new[] { Intent.ActionView }, Categories = n
CustomTabs/Native
UI和Xamarin.Auth
通过自定义web api向Google验证Android应用程序(我无法编辑/更改web api)。是否可以拦截url(https)并在到达此url后返回到应用程序?或者,由于chrome已经打开,这对自定义选项卡不起作用
意向过滤器代码:
[
IntentFilter
(
actions: new[] { Intent.ActionView },
Categories = new[]
{
Intent.CategoryDefault,
Intent.CategoryBrowsable
},
DataSchemes = new[]
{
"https://redirectwebsite.com/"
},
DataPath = "https"
)
]
布莱恩,我们不是在社区闲暇时间交流吗 请救救我。在slack(3个团队)、论坛和github之间切换上下文让我浑身不舒服,而我不是i7 您发布的代码中有大量错误:
"https://redirectwebsite.com/"
是的,有一些教程可以在Android上使用http[s]进行深度链接(应用程序链接),但我没能做到
请尽量少做样品,让我高兴(学习一些东西)。解决方案:
通过更改我的意图过滤器,我成功地导航回我的android应用程序并获取令牌信息:
[IntentFilter
(
actions: new[] { Intent.ActionView },
Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable },
DataSchemes = new[] { "https" },
DataHost = "redirectwebsite.net",
DataPath = "/",
AutoVerify = true
)
]
对我们在空闲时间进行交流,我目前正在学习一些关于应用程序链接的教程(运气不好),如果我能让它正常工作,我会在空闲时间发布一些东西。我也试过了,但不能浪费太多时间。我无法使http[s]方案工作。也许DataHosts和DataPath可以帮助更好地过滤它,但我认为问题在于scheme本身。