当前位置:网站首页>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-78- subset (medium)
- 工作与生活
- spiral matrix visit Search a 2D Matrix
- The interviewer only asked me five questions and the interview was over
- Minimum score of one question per day
- FSOs forest simulation optimization model learning notes
- How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of DBCD, ROC, vroc, Cr and psy index strategy income
- Leetcode question brushing 07 double pointer
- Leetcode question brushing 04 string
- 五篇经典好文,值得一看
猜你喜欢

軟件測試的幾種分類,一看就明了

Happy string

Status of the thread

Create a simple game interface using pyGame
![[Stanford Jiwang cs144 project] lab1: streamreassembler](/img/7b/fad18b68a6ee30d1dec4dad6273b98.png)
[Stanford Jiwang cs144 project] lab1: streamreassembler

Leetcode 01 array

Memory learning book reference

DFS and BFS notes (II): depth first search (implemented in C language)

HashSet underlying source code

Sliding window summary of TCP connections
随机推荐
Rasa对话机器人之HelpDesk (三)
项目实训(十七)---个人工作总结
How to turn on the hotspot for the mobile phone after the computer is connected to the network cable
spiral matrix visit Search a 2D Matrix
【斯坦福計網CS144項目】Lab1: StreamReassembler
Lecture on Compilation Principles
The second round of mesa
Jenkins持续集成操作
pycharm add configutions
Plusieurs catégories de tests logiciels sont claires à première vue
Realization of flip animation
Study notes on the introduction paper of face recognition deep facial expression recognition: a survey
How to solve the problem of database?
軟件測試的幾種分類,一看就明了
ES6 deconstruction assignment
How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of DBCD, ROC, vroc, Cr and psy index strategy income
Leetcode 01 array
Minimum score of one question per day
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
Install pycharm process