how to use the intent anchor to launch my app with extra data(parameters) in android

不羁岁月 提交于 2019-12-21 23:59:30

问题


I have ever tried to launch my app using URI schema in javascript like this:

window.location = "myapp://api/image?imageurl=hogehoge" 

but it failed in android.I don't know why. it's ok in iphone...

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</>

but if I use the intent anchor , how can I pass the extra data ("api/image?imageurl=hogehoge") ?

maybe i can add "S.imageurl=hogehoge" to the href but how can i pass this →"api/image?"


回答1:


Try something like this:

<a href="intent://api/image?imageurl=hogehoge#Intent;scheme=http;package=com.exampl‌​e.myapp;end">Launch my app</a> 


来源:https://stackoverflow.com/questions/33274092/how-to-use-the-intent-anchor-to-launch-my-app-with-extra-dataparameters-in-and

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!