Has anyone else seen an error with web browsing HTC Flyer (hardware acceleration) or found a fix?

This issue is VERY specific for HTC Flyer. One that has been upgraded to a honeycomb or later. It seems like if hardware acceleration is turned on, then WebView just displays empty. The background color will appear, and you can scroll it. You can even select text or links to links, but you just don’t see anything. This is all invisible.

It also records a ton of the following:

D/GLUtils(6612): GL ERROR - after drawQuad() glError (0x502)

Sounds like a bug with Flyer, but has anyone successfully used hardware acceleration with this device and WebView?

Update

I found that this problem occurs when the first WebView application is not hardware accelerated. Then any other WebViews cannot be hardware accelerated without this problem.

Playback:

Create two operations. Each activity can only have a WebView. The first action must be disabled by hardware acceleration. The second is to turn it on.

In the first step (no hardware acceleration) download the url. The page will load fine. Now that the page has loaded and displayed, start the second action from the first.

The second action (hardware acceleration) should also load the URL. This will result in an error. The second activity of the WebView will appear blank.

also:

Oddly enough, you can do the following and it will work:

Run the action with hardware acceleration and web browsing. Download the URL and, after displaying it, run the second action without hardware acceleration. Then, in the second step, download the URL, and then after displaying it, start the third step with hardware acceleration. The third action will be displayed correctly.

Thus, this problem only occurs if the first WebView that runs inside the application / instance life cycle is not accelerated by hardware. It seems that if you do this, then any WebView that later tries to be hardware accelerated will not work properly.

Again, out of the hundreds of devices this app runs on, this only happens on HTC Flyer.

+4
source share
1 answer

Thanks for reporting the problem. I could not make it happen in my own tests. Can you provide more details on what you are doing?

In my tests, I created a simple Android application with a WebView that shows the index.html file from my resource folder. I made sure that hardware acceleration is enabled, both with high targetSdkVersion, and with explicit installation of hardwareAccelerated to true in Android Manifest.xml. Content is displayed in the updated updated Flyer I.

I heard that hardware accelerated web browsing will not work inside other hardware accelerated elements, such as scrolling and similar problems, showing web content on top of other web content. Perhaps it could be something like this at work.

Here is a test project that is currently working: https://github.com/lnanek/HWWebView

Here is the AndroidManifest.xml from here:
<? XML version = "1.0" encoding = "UTF-8">?
<& nbsp; manifest XMLNS: a = "http://schemas.android.com/apk/res/android"
package = "com.htc.sample.hwwebview"
a: VersionCode = "2"
a: versionName = "2.0">
<uses- & nbsp SDK; a: minSdkVersion = "3" a: targetSdkVersion = "15" />
<uses permission- a: name = "android.permission.INTERNET" />
<application a: icon = "@ hood / ic_launcher" a: labels = "@ line / application_name" a: hardwareAccelerated = "true">
<activity a: name = "Viewer" a: labels = "@ line / application_name">
<Intention filter>
<action a: name = "android.intent.action.MAIN" />
<category a: name = "android.intent.category.LAUNCHER" />
</ Intention filter>
</ activity>
</ & application of GT;
& L; / & manifest GT;

Here is the basic layout:
<? XML version = "1.0" encoding = "UTF-8">?
<Webview
XMLNS: android = "http://schemas.android.com/apk/res/android"
android: id = "@ + id / webview"
Android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
/>

+1
source

Source: https://habr.com/ru/post/1414983/


All Articles