1、android webview控件加载html5;
2、即webview基于webkit内核支持html5;
3、进行做自定义屏幕适应调试和测试!
一、通过html页面打开Android本地的app1、首先在编写一个简单的html页面
<html>
<head>
<meta http-equiv=“Content-Type” content=“text/htmlcharset=UTF-8”>
<title>Insert title here</title>
</head>
<body>
<a href=“m://my.com/”>打开app</a><br/>
</body>
</html>
2、在Android本地app的配置
在AndroidManifest的清单文件里的intent-filte中加入如下元素:
<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:host=“my.com”
android:scheme=“m” />
</intent-filter>
示例截图如下:
然后使用“手机浏览器”或者“webview”的方式打开这个本地的html网页,点击“打开APP”即可成功开启本地的指定的app
HTML5嵌入到APP中方法:1、android webview控件加载html5;
2、即webview基于webkit内核支持html5;
3、进行做自定义屏幕适应调试和测试!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)