1

After upgrading my Nexus 7 to Android 5.1 alert() and confirm() boxes in my Webviews (WebChromeClient) are no longer executed.

SetJavaScriptEnabled is set to true and alert() and confirm() worked perfectly well in all earlier versions of Android.

Can anyone running Android 5.1 test this issue so I can confirm if this problem is only related to my device or if this is a bug in the Android 5.1 version?

11
  • Are you using your own WebChromeClient to handle those alert() and confirm() calls? Commented Apr 4, 2015 at 11:38
  • Yes. And the alert() and confirm() calls are being made from the webpage and not from native code. Commented Apr 4, 2015 at 12:30
  • Can you confirm if your WebChromeClient is getting control for alert() and confirm(), in onJsAlert() and onJsConfirm()? IOW, is the issue that you're not getting control, or that you are getting control but what you're doing in those methods is not working? Commented Apr 4, 2015 at 12:35
  • The problem is that the dialogs are not opening up. Nothing happens! The methods are working correct. This problem have to be related to Android 5.1 as everything works perfectly on 5.0 and below. Commented Apr 4, 2015 at 16:12
  • "The problem is that the dialogs are not opening up. Nothing happens!" -- that did not answer my questions. Are you showing the dialogs yourself, or are you having the default dialogs appear? If you are showing them yourself, we would need to see the code for how you are doing that to determine if there is anything specifically odd about their implementation. If, OTOH, you are relying upon the default dialogs, try temporarily removing your WebChromeClient and confirm what the behavior is. Commented Apr 4, 2015 at 16:14

1 Answer 1

1

It's along shot but works for me: My app crashes when displaying a webview on nexus 5 android 5.1. The errors was some codec related or other V8 and chromium stuff...

I found that after uninstalling the updates for "Android system webview" app (go to settings and look for it under "downloaded") it works just fine!

Hopes it helps...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.