android-webview

Not able to load wordpress post content fully in webview in wordpress app on API Level 29. But it works fine on API Level 26

被刻印的时光 ゝ 提交于 2020-07-23 07:20:20
问题 I'm developing WordPress app which fetches post from Wordpress site & loads it in webview. I'm using "WP REST API" (fetch post data in JSON) & retrofit library. In API 26 app is working fine WordPress post is loading fully after migrating to androidx API 29 post content is loading only 1-3 lines in some post & in another post 10 lines. what can be the cause for this?, Contents are not getting loaded fully. After migrating to androidX post were not getting loaded I was getting an error ERR

How to set a whitelist in web view with Android Management API

本小妞迷上赌 提交于 2020-07-23 01:58:15
问题 I am using Chrome Managed Configurations to set a whitelist with this code in my policy: { "packageName": "com.android.chrome", "managedConfiguration": { 'URLBlacklist': ['*'], 'URLWhitelist': ['chrome://*', 'google.com', 'stackoverflow.com'], 'ForceGoogleSafeSearch': True, 'NTPContentSuggestionsEnabled': False, } } Now, in the Chrome enterprise docs it says there is a way to apply the same settings to Android Web view with the com.android.browser:URLBlacklist restriction, but it does not

How to set a whitelist in web view with Android Management API

删除回忆录丶 提交于 2020-07-23 01:57:19
问题 I am using Chrome Managed Configurations to set a whitelist with this code in my policy: { "packageName": "com.android.chrome", "managedConfiguration": { 'URLBlacklist': ['*'], 'URLWhitelist': ['chrome://*', 'google.com', 'stackoverflow.com'], 'ForceGoogleSafeSearch': True, 'NTPContentSuggestionsEnabled': False, } } Now, in the Chrome enterprise docs it says there is a way to apply the same settings to Android Web view with the com.android.browser:URLBlacklist restriction, but it does not

How to set a whitelist in web view with Android Management API

陌路散爱 提交于 2020-07-23 01:55:51
问题 I am using Chrome Managed Configurations to set a whitelist with this code in my policy: { "packageName": "com.android.chrome", "managedConfiguration": { 'URLBlacklist': ['*'], 'URLWhitelist': ['chrome://*', 'google.com', 'stackoverflow.com'], 'ForceGoogleSafeSearch': True, 'NTPContentSuggestionsEnabled': False, } } Now, in the Chrome enterprise docs it says there is a way to apply the same settings to Android Web view with the com.android.browser:URLBlacklist restriction, but it does not

WebView Crawler navigate to url based on page result

*爱你&永不变心* 提交于 2020-07-19 07:17:09
问题 I'm trying to build a web crawler based on the requirements that were described here, and I figured WebView would be the most suitable way to implement this. The problem seems to emerge when the next URL I need to visit is based on the HTML contents of the current page. I am using view.evaluateJavascript to get the current page HTML and parse the URL part inside onReceiveValue, but then there is no way for me to navigate to the URL because onReceiveValue cannot access the view. Also, using

Set user-agent in WebView for Android, API 30

随声附和 提交于 2020-07-10 07:31:00
问题 After reading android user agent I set in WebView: webView.settings.apply { userAgentString = "some string" javaScriptEnabled = true javaScriptCanOpenWindowsAutomatically = true domStorageEnabled = true } And loaded the URL "https://www.whoishostingthis.com/tools/user-agent/". In emulators of API 21 and 29 it worked right. But in API 30 it showed: How to change user-agent in API 30? 回答1: According to https://www.infoq.com/news/2020/03/chrome-phasing-user-agent/, Chrome will replace User-Agent

Set user-agent in WebView for Android, API 30

做~自己de王妃 提交于 2020-07-10 07:30:00
问题 After reading android user agent I set in WebView: webView.settings.apply { userAgentString = "some string" javaScriptEnabled = true javaScriptCanOpenWindowsAutomatically = true domStorageEnabled = true } And loaded the URL "https://www.whoishostingthis.com/tools/user-agent/". In emulators of API 21 and 29 it worked right. But in API 30 it showed: How to change user-agent in API 30? 回答1: According to https://www.infoq.com/news/2020/03/chrome-phasing-user-agent/, Chrome will replace User-Agent

How to add window message event Listener - Android WebView

≡放荡痞女 提交于 2020-07-09 12:42:48
问题 How to add an event listener to handle window message event in a WebView . I have tried this, webView.evaluateJavascript("window.addEventListener('message', function (e) { Android.logData('HELLO')});", null); But it is not working. Is there any way to achieve this? 回答1: After exploring I didn't find any way to get data from the website running in WebView to the app without adding any code to in the website. And finally, I decided to make the necessary changes on my website as well. And this

Android Custom WebView With Rounded Corners

最后都变了- 提交于 2020-06-26 07:45:18
问题 I'm trying to make a custom WebView that is completely identical to a regular WebView except that it has rounded corners. The rounded corners need to be transparent because I'd like to put this WebView in a Dialog. I tried making my custom class like so: public class RoundedWebView extends WebView { private Context context; private int width; private int height; public RoundedWebView(Context context) { super(context); initialize(context); } public RoundedWebView(Context context, AttributeSet

Android Custom WebView With Rounded Corners

馋奶兔 提交于 2020-06-26 07:45:03
问题 I'm trying to make a custom WebView that is completely identical to a regular WebView except that it has rounded corners. The rounded corners need to be transparent because I'd like to put this WebView in a Dialog. I tried making my custom class like so: public class RoundedWebView extends WebView { private Context context; private int width; private int height; public RoundedWebView(Context context) { super(context); initialize(context); } public RoundedWebView(Context context, AttributeSet