We hope that more users will use our products, and we hope to retain more users. At this time, the significance of letting users use the client becomes particularly important.
After all, the client actually occupies the user's desktop, and they will see our products more or less every day.
Then, as a mobile web product, users access our page through the mobile browser, and we hope that users can directly use or download our client product.
Finally, there is a talk about downloading Banner.
IOS
Speaking of IOS, what is very exciting is that since IOS6, we only need to add meta tags to html.
The specific meta tag is:
Of course, for a more specific description, please refer to Apple's developer platform Document: Promoting Apps with Smart App Banners
What about IOS6 and below?
My answer is: just display a download banner.
Android
For Android, if we are careful, we will find that many applications will always be running in the background. Can't even turn it off.
In this way, we can determine whether our App is installed by sending a request to this background process, and then judging whether the request responds correctly.
If there is no correct response, we assume that our client application is not installed.
The basic idea is this, let’s look at the code implementation:
(function() { var isInstalled, url = '_url_', // 找android工程师要吧 script = document.createElement('script'); script.src = url; script.onload = function() { // alert('Is installed.'); isInstalled = true; }; script.onerror = function() { // alert('May be not installed.'); isInstalled = false; } document.body.appendChild(script); })();
For more related articles on how to detect whether a client is installed in Android and IOS browsers, please pay attention to the PHP Chinese website!