webview

Android Studio Simple 'TV' App With Single WebView crashes after long time (profiler shows negative allocated memory?)

拈花ヽ惹草 提交于 2020-06-26 14:52:47
问题 So I have a super simple app with just a WebView that connects to our host page and acts as a 'TV'. After checking for memory leaks, I run this app on my Amazon Fire Stick for an extended period of time, but regardless after around 8-9 hours it crashes without exception on the console. How did I check for memory leaks: LeakCanary did not detect any leaks. Watching the memory profiler over time I see that the total memory used always consistently averages 400MB, even at the 8 hour mark.

How to disable remote android debugging of WebView in Ionic/Cordova

笑着哭i 提交于 2020-06-25 05:55:08
问题 I have an Android app built on top of the Ionic/Cordova platform. By default Remote Android Debugging is enabled. https://developers.google.com/web/tools/chrome-devtools/remote-debugging/ This means that if the device is connected to a computer, one can go open the Chrome browser, go to chrome://inspect find a list of webpages, or app's with webviews, click inspect and see the apps HTML, JS and other resources. This is fine for debugging but I'd like this disabled in the released app. In

How to get the body of the WebResourceRequest in android webView

浪尽此生 提交于 2020-06-24 08:06:47
问题 I need to modify the request header of the android webView request.So, I add following code in the method shouldInterceptRequest . Here is my code. @Override public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) { try { String mUrl = request.getUrl().toString(); OkHttpClient httpClient = new OkHttpClient(); Request mRequest = new Request.Builder() .url(request.getUrl().toString()) .addHeader("token", UserHelper.getToken()) //add headers .build(); Response

Play Vimeo video in Android , video url containing iframe

房东的猫 提交于 2020-06-23 04:41:26
问题 Hello i am working on android application in which i want to play vimeo videos , i am getting response from Api in json and playing video using webview and it is playing good , but the webview is displaying very small and the playing video is also small my problems are I want playing video width to be according to android device width. I can get it from Displaymetrics but how to set to iframe ? I want to inflate custom view of media controller for playing videos. Custom controller like play

JavaFX WebView: how do I change the default cursor?

∥☆過路亽.° 提交于 2020-06-17 13:16:27
问题 How do I change WebView's default cursor? Every change I make is ignored, the icon always reverts back to the default pointer. Example: import javafx.application.Application; import javafx.scene.Cursor; import javafx.scene.Scene; import javafx.scene.layout.VBox; import javafx.scene.web.WebView; import javafx.stage.Stage; public class Main extends Application { public static void main(String[] args) { launch(args); } public void start(Stage primaryStage) { primaryStage.setTitle("JavaFX WebView

Problem in Saving State of Webview inside Fragment

早过忘川 提交于 2020-06-17 09:18:26
问题 I have 3 fragments in my App.1 fragment is having webview. I am using recyclerview.Using onclick method to switch between fragments. FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); fragmentTransaction.replace(R.id.fragment, fragment); fragmentTransaction.commit(); I tried below code to save state of fragment public void onSaveInstanceState(@NonNull Bundle outState) { super.onSaveInstanceState(outState); webView.saveState(outState); } public void

Android WebView onPageCommitVisible not fired

落花浮王杯 提交于 2020-06-14 06:50:54
问题 I have a WebView, which loads an html page from server, but the page is invisible on the WebView. The html is loaded properly (I've debugged with chrome://inspect and the html, including all javascripts exist), but it is invisible on the phone screen. There was no changes in my code, when this bug appeared. The bug appeared when I installed updates to Android System WebView on my phone. If I uninstall the updates, all works properly again. In addition, I've checked the callbacks of the

Android WebView onPageCommitVisible not fired

主宰稳场 提交于 2020-06-14 06:50:10
问题 I have a WebView, which loads an html page from server, but the page is invisible on the WebView. The html is loaded properly (I've debugged with chrome://inspect and the html, including all javascripts exist), but it is invisible on the phone screen. There was no changes in my code, when this bug appeared. The bug appeared when I installed updates to Android System WebView on my phone. If I uninstall the updates, all works properly again. In addition, I've checked the callbacks of the

Getting Resources$NotFoundException in Webview of Android 8 (Oreo)

时光怂恿深爱的人放手 提交于 2020-06-12 04:52:11
问题 I am loading the URL of a website in WebView of my app. This website takes the basic details of a user. I am loading the WebView in activity. But when users of Android 8 clicks on the drop down of a website then the app throws below error. Please note that this WebView works perfectly on Android 7.1 or below. It only throws error in Android 8.0. FATAL EXCEPTION: main Process: <Package Name>, PID: 9392 android.content.res.Resources$NotFoundException: Resource ID #0x0 at android.content.res

Getting Resources$NotFoundException in Webview of Android 8 (Oreo)

柔情痞子 提交于 2020-06-12 04:52:07
问题 I am loading the URL of a website in WebView of my app. This website takes the basic details of a user. I am loading the WebView in activity. But when users of Android 8 clicks on the drop down of a website then the app throws below error. Please note that this WebView works perfectly on Android 7.1 or below. It only throws error in Android 8.0. FATAL EXCEPTION: main Process: <Package Name>, PID: 9392 android.content.res.Resources$NotFoundException: Resource ID #0x0 at android.content.res