Issue - blockWebkitDraw lockedfalse [duplicate] - android

This question already has answers here:
Android 4.3 and PhoneGap, cant tap link
(2 answers)
Closed 8 years ago.
I'm developing app on phonegap, when i execute my app on Samsung Galaxy S4 and in sony ericsson device i'm getting the following error "blockWebkitDraw lockedfalse".
many click events are not working properly and on the above mentioned devices my app seems not working, no events are getting triggered and i get the error "blockWebkitDraw lockedfalse"
Please any one suggest how to fix the problem.
Thanks in advance.

I was banging my head with a very similar issue while testing on a Galaxy Tab 2. Here's what I discovered:
The error message in my console with tag WebViewInputDispatcher and value blockWebkitDraw lockedfalse appears to occur every single time I touch the screen, regardless of whether I click on a button or link. Therefore, this error message relates to onTouch events, not your click events as you might have expected.
When originally testing by clicking on one of my links, I originally thought the Galaxy Tab was blocking my link. It turns out, the Galaxy Tab 2 is just very insensitive to click behavior so when I thought I was clicking on the link, I was actually missing. By clicking slightly higher than I thought was necessary, I was able to activate my link.
To validate my suspicion, I greatly increased the font size of my link. With the much bigger link, I am able to click the link successfully on the first try, and my app now performs as expected. I strongly suspect that if you just make your clickable elements a lot bigger, you'll be able to click them successfully.

Hello I had the same problem and it was driving me nuts. I solved it by adding a listener to a touch event, in my case it was touchmove, the listener executed e.preventDefault(); e.stopPropagation();
this solved the issue I was having but did not prevent the notices in logcat.

I had the same problem with samsung tab 2. I read it somewhere samsung's hardware acceleration broken webkit. The problem went aways after I turned off hardware acceleration in android manifest.

Related

Android screen stops reading inputs

First off, this has never happened before on any other android device I've used (multiple devices have been tried and tested before this).
Now I have an app that I have worked on for a little over a year now, it is called AutomatedId (on the app store) and it has worked quite well for my company for quite some time.
Recently I have been given a device to add compatibility to the app (specifically for reading UHF tags) but that isn't the problem.
The problem comes whenever you open the app, the screen stops reading inputs completely, as well as buttons cease to function. I turned on developer options to see the screen inputs and as i suspected, it completely stops and does not read any of the inputs after the app is opened. Clicks don't work, buttons don't work, keyboard doesn't open, hardware buttons on the device stop working. It's a mess, does anyone know what could have caused this?
This is a S98 from here: http://www.wepoy.com/product_view_18.html
moved my comment to the answer as you said. This may be due to memory leak. Here are some references that may help you fix them: Fixing-Memory-Leaks-in-Android-Studio & use this library from square to detect memory leaks early: leakcanary

intel xdk tap/click not working

I have a problem using the intel xkd.
I used it for 2-3 month and it worked well.
Since the last update, my app doesn't work anymore.
The application works, but it seems that the device doesn't handle the tap on screen.
if i click on a button with the mouse on the pc it works, but i i tap it on the phone the event doesn't work.
I don't know why.
if i start a new project from a default template the problem is still there so i think it's a problem related to the XDK/Cordova, but searching on their forum i didn't found nothing.
Check the js file via the embedded editor. There's a high probability that you will see errors/warnings. It could be a missing semicolon or an unclosed bracket.
Secondly, add onclick like this:
function Tap(){
alert("tapped");
}
<button onclick="Tap();">ClickMe</button>

Frozen webview when clicking textbox in embedded web - Android 4.3

I try to run an embedded web in Android, but it crashes when using Android 4.3 (Nexus 4). I run the app and the first webview appears correctly, but when I touch the textbox and the keyboard appears, the view gets frozen just on the top part of the keyboard (where the text predictor is located in case it's active).
This problem only appeared when using 4.3, not with the previous versions.
I've been trying to fix the bug as it says in this issue, but the solutions they give don't resolve my case: https://code.google.com/p/android/issues/detail?id=42518&q=webview&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
I would love if somebody have been through this problem, because we don't know what to do to fix it...
After more than one year without trying the app, it is working now. The device now is running Android Lollipop, so I guess that probably the WebView has some improvement that avoids the bug.

What does blockWebkitDraw mean and how to fix it? [duplicate]

This question already has answers here:
Android 4.3 and PhoneGap, cant tap link
(2 answers)
Closed 8 years ago.
I'm wrapping an Android app using a WebView and it requires rendering an HTML5 canvas. It works perfectly on all my devices, except for one. My Galaxy S4 (4.2.2) is flashing the canvas, then it quickly turns grey. Here is the logcat message it's producing:
D/GestureDetector(20071): [Surface Touch Event] mSweepDown False,
mLRSDCnt : -1 mTouchCnt : 7 mFalseSizeCnt:0
V/WebViewInputDispatcher(20071): blockWebkitDraw
V/WebViewInputDispatcher(20071): blockWebkitDraw lockedfalse
D/webview(20071): blockWebkitViewMessage= false
I click on a button, then the canvas is supposed to render. That is why the first log item is for a surface touch event. It works on my S4 when I ping my app using the webkit browser directly, but when wrapping it myself or using Cordova is gives me that error. I've added two screenshots to further display the issue. The first is rendered correctly and the second is the problem.
Android 2.3.6:
Android: 4.2.2:
So back to my question. What's going on with this message? Does anybody have any suggestions on how to have it properly render the canvas?
I was able to fix the problem by setting my minimum sdk version in the android manifest file to 14:
<uses-sdk android:minSdkVersion="14" />
At version 14, the messages still appear in the log, but the touch events are processed. When I set the minSdkVersion back, the touch events are not processed. Turning off hardware acceleration in the manifest, as well as by various CSS webkit styles, did not help. Only the minSdkVersion setting fixed it for me.
Somehow, on the Galaxy Tab, the SDK support for older versions causes problems with the javascript touch event processing, and blockWebkitDraw stays true while a touch move is happening. This prevents my canvas code from receiving the touchmove events and executing the draw. When I set the SDK version to 14, blockWebkitDraw gets set to true when a touch event fires, but it is unset after the touch is processed, and the canvas code to draw gets called.
I did some cursory browsing of the WebView and WebViewInputDispatcher classes, but didn't come up with anything. Maybe you could take a look there.
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.2.2_r1/android/webkit/WebView.java
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.2.2_r1/android/webkit/WebViewInputDispatcher.java
My thought was that perhaps you could pinpoint where the blocking occurs and either extend those classes or create your own copy and modify them.
I was banging my head with a very similar issue while testing on a Galaxy Tab 2. In my case, I had a simple hyperlink, not a button, but the issue is the same. Here's what I discovered:
The error message in my console with tag WebViewInputDispatcher and value blockWebkitDraw lockedfalse appears to occur every single time I touch the screen, regardless of whether I click on a button or link. Therefore, this error message relates to onTouch events, not your button click as you might have expected.
When originally testing by clicking on one of my links, I originally thought the Galaxy Tab was blocking my link. It turns out, the Galaxy Tab 2 is just very insensitive to click behavior so when I thought I was clicking on the link, I was actually missing. By clicking slightly higher than I thought was necessary, I was able to activate my link.
To validate my suspicion, I greatly increased the font size of my link. With the much bigger link, I am able to click the link successfully on the first try, and my app now performs as expected. I strongly suspect that if you just make your button a lot bigger, you'll be able to click it successfully.
I had a similar problem on Galaxy S3. I found the solution in this answer: https://stackoverflow.com/a/20433029/3531606.
The problem was solved by adding the following css to all problematic DOM elements:
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0, 0, 0);
Applying translate3d to element can turn on hardware acceleration on some devices (see this answer: https://stackoverflow.com/a/18529444/3531606), so it may help with the rendering too.

How do I fix visible 'invisible-buttons' in Android app port to Blackberry?

I have a very simple Android app. It is one Activity with Text and Buttons, and as you click on the buttons (onTouch events), they become invisible and the text changes.
This works fine for Android 3 and Android 2.3.3 simulators, but when I use the BlackBerry nature in Eclipse to send the app to a BlackBerry playbook simulator, funny things happen. As I click on the buttons they go invisible, but other buttons change too.
Buttons that were only ever visible, stay visible. Some Buttons that were invisible, become visible. Some buttons that had become visible earlier, return to being invisible.
It feels like a redraw problem, or some strange caching on the button state.
Anybody got any ideas? Wild guess excepted ...
Get a playbook or wait until RIM updates their broken simulator.
I converted an app for the playbook and the code was running fine on the simulator. It's a very simple app too, like a binary calculator. A couple of toggleButtons, Buttons and a TextView.
The app had visual issues, similar to yours. Buttons disappeared. Buttons were highlighted when I pressed buttons around them. ToggleButtons didn't change state. And much much more.
Since I don't have a playbook I couldn't test it on a real device. I tried layout changes, code changes and tried different settings. But nothing helped, those issues stayed.
After some reading in their forum I came to the conclusion that this might be an issue with the simulator.
So I submitted the app to the AppWorld 5 days ago. It got approved today.
So there is a chance that your app is alright, and the problem is the simulator.

Categories

Resources