AndroidMenifest.xml
<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" />
</intent-filter>
Launcher Activity code
//取得URL所带进来的Intent对象
Intent tIntent = this.getIntent();
//取得Schema,值为:myapp
String tSchema = tIntent.getScheme();
//取得URL
Uri myURI = tIntent.getData();
String tValue = "";
if (myURI != null) {
//取得URL中的Query String参数
tValue = myURI.getQueryParameter("id");
}
LogProxy.d(TAG, "my id=" + tValue);
html:
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<a id="open" href="hwy://demo?id=799KK3at&snsType=WEIXIN_SECRET_SHARE&openId=null&type=SHARE">open it
</body>
</html>