android 中 浏览器调用本地app应用



android 中 浏览器调用本地app应用

app应用的 AndroidManifest.xml 定义文件
Xml代码 收藏代码
<activity >
<intent-filter>
<action android:name=”android.intent.action.VIEW” />

<category android:name=”android.intent.category.LAUNCHER” />
<category android:name=”android.intent.category.DEFAULT” />
<category android:name=”android.intent.category.BROWSABLE” />

<data
android:host=”my.a”
android:scheme=”m” />
</intent-filter>
</activity >
调用网页
Html代码 收藏代码
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>
<title>Insert title here</title>
</head>
<body>
<a href=”m://my.a/play?a=b”>local3</a><br/>
</body>
</html>