1.在想要跳转的activity下面配置下面的配置
<activity android:name=".view.AuthLoginCheckActivity" android:screenOrientation="portrait" >
<!--要想在别的App上能成功调起App,必须添加intent过滤器-->
<intent-filter> <!--协议部分,随便设置-->
<data android:host="zeekr" android:path="/zeekrloginask" android:port="8080" android:scheme="zeekr"/>
<!--下面这几行也必须得设置-->
<category android:name="android.intent.category.DEFAULT"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/> </intent-filter></activity>
2.测试页面之间的跳转
val action = Intent(Intent.ACTION_VIEW)
val builder = StringBuilder()
builder.append("zeekr://zeekr:8080/zeekrloginask")
action.data = Uri.parse(builder.toString())
startActivity(action)
3.网页跳转原生页面。
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> </head> <body> <a href="zeekr://zeekr:8080/zeekrloginask">打开APP工具详情页</a> </body> </html>