棉花糖上本机WebView中的Instagram链接 [英] Instagram-Links in native WebView on Marshmallow

查看:300
本文介绍了棉花糖上本机WebView中的Instagram链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我注意到当您尝试调用 https://www.instragram.com时,出现了一个非常奇怪的错误. /在您的智能手机运行 Android 6棉花糖时在网络视图中.

Recently I noticed a really strange bug that appears, when you try to call https://www.instragram.com/ in a webview when your smartphone runs Android 6 Marshmallow.

问题是,屏幕始终保持空白,只是中间有一个小instagram图标-看起来像是正在加载的屏幕.看起来像这样:

The problem is, that the screen remains blank all the time, just with that little instagram-icon in the middle - kind of a loading screen it seems. It looks like this:

当您在未启用JavaScript的情况下在浏览器中查看Instagram页面时,也会发生这种情况-如果没有JavaScript,该页面似乎无法加载.奇怪的是,我在网络视图中做了以下设置:

This also happens when you view Instagram pages in your browser without having JavaScript enabled - it seems like the page does not load without JavaScript. The strange thing is, that I did the following setttings in my webview:

 WV_Downloader.getSettings().setJavaScriptEnabled(true);
 WV_Downloader.getSettings().setDomStorageEnabled(true);
 WV_Downloader.getSettings().setBlockNetworkImage(false);
 WV_Downloader.getSettings().setLoadsImagesAutomatically(true);

在更高版本的Android上,它可以完美运行,为什么它不能在Android 6上运行?没有错误日志,只有一些正常的铬输出(我认为)不会导致这样的行为:

On later Android versions it works perfectly, why doesn't it work on Android 6? There are no error-logs, just some normal chromium-outputs that (I think) wouldn't cause a behaviour like this:

I/chromium: [INFO:CONSOLE(0)] "Unrecognized Content-Security-Policy directive 'worker-src'."
I/chromium: [INFO:CONSOLE(16)] "The key "viewport-fit" is not recognized and ignored."
I/chromium: [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot read property 'entry_data' of undefined"
W/chromium: [WARNING:keycode_converter.cc(91)] empty code string
I/chromium: [INFO:CONSOLE(0)] "The source list for Content Security Policy directive 'script-src' contains an invalid source: ''report-sample''. It will be ignored."
I/chromium: [INFO:CONSOLE(0)] "The source list for Content Security Policy directive 'script-src' contains an invalid source: ''strict-dynamic''. It will be ignored."
I/chromium: [INFO:CONSOLE(0)] "Unrecognized Content-Security-Policy directive 'worker-src'.

我在互联网上找不到这种行为的解释.有人可以解释一下,这可能是什么原因?预先感谢!

I couldn't find an explanation for this behaviour on the internet. Can someone explain me, what could be the reason for this? Thanks in advance!

推荐答案

您需要在Android系统上更新Webview软件包.

You need to update webview package on your Android system.

这篇关于棉花糖上本机WebView中的Instagram链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆