如何使用意图锚在android中使用额外的数据(参数)启动我的应用 [英] how to use the intent anchor to launch my app with extra data(parameters) in android
问题描述
我曾经尝试使用javascript中的URI模式启动我的应用程序,如下所示:
I have ever tried to launch my app using URI schema in javascript like this:
window.location = "myapp://api/image?imageurl=hogehoge"
但是它在android中失败了.我不知道为什么.在iPhone上还可以...
but it failed in android.I don't know why. it's ok in iphone...
因此,我更改为使用意图锚点按此处所述在android中启动我的应用.我可以使用此语法
so I changed to use the intent anchor to launch my app in android as described here. I'm able to get it to launch my app using this syntax,
<a href="intent://#Intent;scheme=http;package=com.example.myapp;end">Launch my app</>
但是如果我使用意图锚,如何传递额外的数据("api/image?imageurl=hogehoge")
?
but if I use the intent anchor , how can I pass the extra data ("api/image?imageurl=hogehoge")
?
也许我可以将"S.imageurl=hogehoge"
添加到href中,但是如何传递此→"api/image?"
maybe i can add "S.imageurl=hogehoge"
to the href but how can i pass this →"api/image?"
推荐答案
尝试如下操作:
<a href="intent://api/image?imageurl=hogehoge#Intent;scheme=http;package=com.example.myapp;end">Launch my app</a>
这篇关于如何使用意图锚在android中使用额外的数据(参数)启动我的应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!