


JS implements clicking on the web page to determine whether to install the app and open it, otherwise jump to the app store
Dec 06, 2016 pm 02:12 PMThere 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 <meta> tag within the <head> tag. The format is as follows:
1 |
|
For example, add a Baidu Tieba Native APP Banner, use the following code:
1 |
|
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. . .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Of course, if you design it as a QR code, you can use the following code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Which one to use depends on your actual scenario!
When we browse the web, you will see a prompt box "Open APP" or "Download APP" floating below the web page. If your phone has already installed this APP, then the web page will prompt "Open APP" ”, if it is not installed, it will prompt “download APP”. How is this implemented from a technical perspective? Let me share this technology with you. When the company was working on a project for the International Cartoon and Animation Festival last year, the customer mentioned this requirement. When clicking on the web page company, open the APP directly (if it is already installed). If it has not been installed, open it directly. APP page
Now I will share the source code of this piece
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
Everyone needs to pay attention to two issues during the process:
1. The interface address must be written correctly. You can check the schema protocol , called through this protocol
2. When using Android, if you use WeChat scan or QQ browser to scan the code
There will be a problem when using the above protocol, which is that you must use APK to list it on Tencent Go to the app market

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to use JS and Baidu Maps to implement map pan function

Recommended: Excellent JS open source face detection and recognition project

Essential tools for stock analysis: Learn the steps to draw candle charts with PHP and JS

PHP and JS Development Tips: Master the Method of Drawing Stock Candle Charts

How to create a stock candlestick chart using PHP and JS

How to use JS and Baidu Maps to implement map polygon drawing function

How to use JS and Baidu Map to implement map click event processing function
