当前位置:网站首页>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
边栏推荐
- [leetcode] valid phone number Bash
- Ecological convergence NFT attacks, metaverse ape leads the new paradigm revolution of Web 3.0 meta universe
- Detailed explanation of Joseph problem
- Stmarl: a spatio temporal multi agentreinforcement learning approach for cooperative traffic
- Thread code learning notes
- 论文笔记:STMARL: A Spatio-Temporal Multi-AgentReinforcement Learning Approach for Cooperative Traffic
- Study notes on the introduction paper of face recognition deep facial expression recognition: a survey
- Realization of flip animation
- Leetcode question brushing 03 stack
- Transaction characteristics and isolation levels
猜你喜欢
[Latex] 插入圖片
Key point detection data preparation and model design based on u-net Network -- detection model of four key points of industrial components
Jenkins continuous integration operation
在国企做软件测试工程师是一种什么样的体验:每天过的像打仗一样
HashSet underlying source code
Leetcode-19- delete the penultimate node of the linked list (medium)
Work and life
数学知识整理:极值&最值,驻点,拉格朗日乘子
Introduction to common activation functions
C language implementation of the classic eight queens problem
随机推荐
软件测试的几种分类,一看就明了
Detailed explanation of Joseph problem
[从零开始学习FPGA编程-21]:进阶篇 - 架构 - VerilogHDL编码规范
leetcode. 151. flip the words in the string
How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of BBI, MTM, obv, CCI and priceosc indicators
About_ int128
Traditional machine learning classification model predicts the rise and fall of stock prices under more than 40 indicators
Plusieurs catégories de tests logiciels sont claires à première vue
Polymorphism and virtual function
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
leetcode. 541. reverse string II
Leetcode-9-palindromes (simple)
np. Understanding of axis in concatenate
5G工业网关在煤矿行业的应用优势
A problem discovery and attempted solution to the strange stop of server script
304. Merge two ordered arrays
Application advantages of 5g industrial gateway in coal industry
Golang inline mechanism & go development test
Golang context (context summary)
工作与生活