当前位置:网站首页>H5 open the app. If the app is not downloaded, jump to the download page. If the app has been downloaded, wake up the app
H5 open the app. If the app is not downloaded, jump to the download page. If the app has been downloaded, wake up the app
2022-06-13 01:23:00 【Durian is not delicious】
Android :
h5 Wake up Android :
Android configuration :
<activity android:name=".TestActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="myapp" android:host="myhost">
</data>
</intent-filter>
</activity>
artifacts intent character string :
intent:
myhost // specific schema uri, for example login Means open app Native landing page
#Intent;
package=com.lcp.testweb; // apk Package name
action=android.intent.action.VIEW; // page action
category=android.intent.category.DEFAULT; // Page type
scheme=myapp; // Protocol type
S.browser_fallback_url=https://www.baidu.com // Optional ,schema Jump page when starting the client fails , Generally, it is a download page , Need to pass encodeURIComponent code
end;
h5:
Construct a a label , The above schame String as its href value , When you click a When labeling , That is, through schema Open a client login page , If the client is not installed , Will jump to the specified page , This will jump to the download page
<a href="intent://myhost#Intent;scheme=myapp;package=com.lcp.testweb;category=android.intent.category.DEFAULT;action=android.intent.action.VIEW;S.browser_fallback_url=http%3A%2F%2Fwww.baidu.com;end"> open test</a>
If necessary, the configuration can be js Tune up , Be sure to configure the following sentence
<category android:name="android.intent.category.BROWSABLE"></category>
Jump to the download page without downloading , Wake up if it has been downloaded APP Solution
If you don't download , I can't open it , Time delay 5 Seconds to detect if the browser is backed out of the background , It means that it is opened app, If 5 Seconds later, if the browser is not set to the background, it means that the jump is not successful , That means it's not installed
Here is a case : You can click here
IOS:
[scheme]://[host]/[path]?[query]
scheme from ios Students provide
for example :
myapp://fanyi.baidu.com/translate?aldtype=16047
Paste it directly into the browser to open it
边栏推荐
- Method of cleaning C disk
- 4K sea bottom and water surface fabrication method and ocean bump displacement texture Download
- How to print infinite symbol in WPS
- Stmarl: a spatio temporal multi agentreinforcement learning approach for cooperative traffic
- Introduction to common activation functions
- [latex] insert picture
- September 3, 2021 visual notes
- Pysmb usage
- Leetcode find duplicates
- Facial expression recognition dataset
猜你喜欢

MySQL connection query

Common skills for quantitative investment - indicators Chapter 3: detailed explanation of RSI indicators, their code implementation and drawing

The storage structure of a tree can adopt the parent representation, that is, the parent pointer array representation. Try to give the corresponding class definition. Each tree node contains two membe
![[latex] insérer une image](/img/0b/3304aaa03d3fea3ebb93b0348c3131.png)
[latex] insérer une image

Sliding window summary of TCP connections

Jenkins continuous integration operation

Plusieurs catégories de tests logiciels sont claires à première vue

Key point detection data preparation and model design based on u-net Network -- detection model of four key points of industrial components

How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic benefits of ASI, VR, arbr, DPO and trix indicators

Leetcode-11- container with the most water (medium)
随机推荐
Minimum spanning tree problem
Matrix fast power
Remove duplicates from an ordered array
Leetcode-13- Roman numeral to integer (simple)
np. Understanding of axis in concatenate
数学知识整理:极值&最值,驻点,拉格朗日乘子
How to turn on the hotspot for the mobile phone after the computer is connected to the network cable
Pipeline流水线项目构建
Differences among bio, NiO and AIO
C language implementation of the classic eight queens problem
Wal mechanism of MySQL
707. design linked list
The interviewer only asked me five questions and the interview was over
Downloading wiki corpus and aligning with multilingual wikis
Mysql database listening -canal
Tangent and tangent plane
Vector|hdu-4841 round table questions
Leetcode-14- longest common prefix (simple)
Plusieurs catégories de tests logiciels sont claires à première vue
Tkinter library installation