[英]how to use the intent anchor to launch my app with extra data(parameters) in android
I have ever tried to launch my app using URI schema in javascript like this: 我曾经尝试使用javascript中的URI模式启动我的应用程序,如下所示:
window.location = "myapp://api/image?imageurl=hogehoge"
but it failed in android.I don't know why. 但是它在android中失败了。我不知道为什么。 it's ok in iphone...
在iPhone上还可以...
so I changed to use the intent anchor to launch my app in android as described here. 因此我更改为使用意图锚点按此处所述在android中启动我的应用。 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</>
but if I use the intent anchor , how can I pass the extra data ("api/image?imageurl=hogehoge")
? 但是,如果使用意图锚,如何传递额外的数据
("api/image?imageurl=hogehoge")
?
maybe i can add "S.imageurl=hogehoge"
to the href but how can i pass this → "api/image?"
也许我可以将
"S.imageurl=hogehoge"
添加到href中,但是如何传递此→ "api/image?"
尝试这样的事情:
<a href="intent://api/image?imageurl=hogehoge#Intent;scheme=http;package=com.example.myapp;end">Launch my app</a>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.