Objective
A recent project requires iOS and Android to use a two-dimensional code to allow the scanned machine itself to identify the operating system implementation to jump to the corresponding download link. For example, the iphone using micro-letter scanning let him jump to the App Store download page, the Android machine using micro-mail scanning directly jump browser download. But the two-dimensional code also has a demand is that the user has downloaded the app, when the user opened the app into the registration page, scan the two-dimensional code again, automatically fill in the invitation code to register. Then how to implement, the details do not say, directly on the code.
Use JS implementation, in fact, the code is very simple.
Copy the code directly when you use it, and get rid of the corresponding link.
PS: The link in the micro-trust environment when it is open or need to manually jump to the phone's browser to jump to the download page, because the webview in the micro-letter is more special, so write an alert to guide the user to open the browser.
Summarize
That's how iOS and Android use the same two-dimensional code to jump to download links, everyone has learned, I hope this article on the content of our study or work can bring some help, if there is a better solution or can be used to judge the micro-letter client system environment method please message exchange.