Android 我能';无论我发送什么用户代理,都不能让vine.co加载到WebView上。
我正在制作一个应用程序,需要能够浏览到几个网站,其中一个网站可能是vine.co。无论如何,它几乎可以加载所有网站,但当我去test vine.co时,它不会显示任何内容。我从头开始做了一个webview示例来尝试它,但遇到了同样的问题。我在4.3和4.4上试过Android 我能';无论我发送什么用户代理,都不能让vine.co加载到WebView上。,android,android-webview,chromium,Android,Android Webview,Chromium,我正在制作一个应用程序,需要能够浏览到几个网站,其中一个网站可能是vine.co。无论如何,它几乎可以加载所有网站,但当我去test vine.co时,它不会显示任何内容。我从头开始做了一个webview示例来尝试它,但遇到了同样的问题。我在4.3和4.4上试过 WebView wv = (WebView) findViewById(R.id.webview); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
WebView wv = (WebView) findViewById(R.id.webview);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (0 != (getApplicationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE)) {
wv.setWebContentsDebuggingEnabled(true);
}
}
WebSettings settings = wv.getSettings();
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
// settings.setBuiltInZoomControls(true);
settings.setSupportMultipleWindows(true);
settings.setLoadWithOverviewMode(true);
settings.setUseWideViewPort(true);
//settings.setMediaPlaybackRequiresUserGesture(true);
wv.setWebChromeClient(new WebChromeClient() {
});
wv.setWebViewClient(new WebViewClient(){
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
}
});
wv.loadUrl("https://vine.co");
这是我得到的回复,页面看起来一片空白
<html><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Vine</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="/assets/1035bae3.app.min.css">
<link rel="shortcut icon" type="image/png" href="/assets/images/favicon.ico">
<!-- for more details visit: https://github.com/yeoman/grunt-usemin -->
<script type="text/javascript" async="" src="https://ssl.google-analytics.com/ga.js"></script><script src="/assets/acb720d0.config.min.js"></script>
<script src="/assets/e5147ec0.vendor.min.js"></script>
<script src="/assets/3cabf7a5.app.min.js"></script>
<script type="text/javascript">
window.APP_CONFIG = {"API_HOST": "https:\/\/api.vineapp.com", "CDN_HOST": "d3422saexnbpnl.cloudfront.net", "TWITTER_API_KEY": "PznIKCDSsllDCqWPooGSJg", "CLIENT_LOGGING": false, "CDN_PREFIX": "", "SECURE_HOSTNAME": "https:\/\/vine.co", "CDN_VERSION": "20140121"};
window.PUSHSTATE_ENABLED = window.history && window.history.pushState;
</script>
<script type="text/javascript">
window._gaq = window._gaq || [];
window._gaq.push(['_setAccount', 'UA-34240974-1']);
window._gaq.push(['_setDomainName', 'vine.co']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<!--[if lt IE 8]>
<p class="browsehappy">
You are using an <strong>outdated</strong> browser. Please
<a href="http://browsehappy.com/">upgrade your browser</a>
to improve your experience.
</p>
<![endif]-->
<script>
window.App = require('appkit/app')["default"].create();
</script>
</body></html>
藤蔓植物
window.APP\u CONFIG={“API\u主机”:“https:\/\/API.vineapp.com”、“CDN\u主机”:“d3422saexnbpnl.cloudfront.net”、“TWITTER\u API\u密钥”:“PZNIKCDSLLDCQWPOOGSJG”、“客户端日志记录”:false,“CDN\u前缀”:“安全主机名”:“https:\/\/vine.co”、“CDN\u版本”:“20140121”};
window.PUSHSTATE_ENABLED=window.history&&window.history.PUSHSTATE;
窗口。_gaq=窗口。_gaq | |[];
窗口。_gaq.push([''u setAccount','UA-34240974-1']);
window._gaq.push([''u setDomainName','vine.co']);
(功能(){
var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;
ga.src=('https:'==document.location.protocol?'https://ssl' : 'http://www“)+”.google analytics.com/ga.js';
var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga,s);
})();
window.App=require('appkit/App')[“default”].create();
我到底做错了什么?它在Chrome上加载得很好,我听说它和kitkat上的WebView使用相同的引擎
谢谢。看起来罪犯可能没有
设置。setDomStorageEnabled(true)代码>