JS implements clicking on the web page to determine whether to install the app and open it, otherwise jump to the app store

高洛峰
Release: 2016-12-06 14:12:07
Original
1838 people have browsed it

There are often scenarios where the APP we develop needs to be promoted, such as a large banner picture or a QR code at the top of the page. But often we directly add a download link (from the App Store) to the promotional image. So let’s simulate the user’s operation steps:

1. The user visits the promotion page for the first time

a. Click Banner and enter the corresponding APP download page in the APP Store

b. The APP download page prompts: Install; The user clicks to install

c. After the installation is completed, the APP download page prompts: Open; the user continues to click to open

d. The user uses the APP normally

2. The user visits the promotion page for the second time

a. Click Banner to enter Go to the corresponding APP download page in the APP Store

b. The APP download page prompts: Open; the user directly clicks to open

c. The user uses the APP normally

3. The user’s third, fourth,..., For the Nth visit, the operation steps are the same as 2

It can be seen that whether it is clicking the Banner or scanning the QR code, the experience is very bad for users who have already installed the APP.

A better experience is: after clicking the Banner (or scanning the QR code), the program will determine whether the App has been installed on the current system. If not, it will automatically jump to the App Store download page; otherwise, open the App directly.

On iOS, to add a large Banner for an APP, you only need to add a tag within thetag. The format is as follows:

Copy after login

For example, add a Baidu Tieba Native APP Banner, use the following code:

Copy after login

As for whether it can be opened directly after clicking the link, you can use the following code to achieve it. Prerequisite: You must know the opening protocol corresponding to your APP, such as Tieba APP, the protocol is: com.baidu.tieba://, WeChat: weixin://, and so on. . .

 贴吧客户端 
Copy after login

Of course, if you design it as a QR code, you can use the following code: