iOS/Android How do you make it possible to directly open apps on your phone with just one click on a webpage?
Nowadays, many apps shared can be opened with one click. How is this done? Is there any open source one?
漂亮男人2017-06-29 10:11:36
Use Scheme, if the link of the a tag points to http: //This is a web page, customize it, qq: // This will open QQ
Look here for iOS
Look here for Android
世界只因有你2017-06-29 10:11:36
@kiss is right!
But it is strongly not recommended to customize scheme
, because when your product is not world-famous, no one (except yourself) knows how to handle your customized scheme
. So use http-scheme
+ directly Just listen to host
(+path
), so that even if the user does not install your App, they can directly browse the web using the browser.
p.s. This is how Zhihu App handles it. I saw a Google Android developer also suggested this a long time ago.
In addition, if the webpage is opened on WeChat, it may require some processing to open your App, because WeChat controls it.
p.p.s. Some manufacturers cooperate with WeChat, such as JD.com, Meilishuo, etc. (Open WeChat and enter Me
-Wallet
-Third-party services
) in order, which can be opened directly.