0

I have an instant game that uses WebView. If I build apk and run it as a normal Android application, the rendering on the view works very quickly on all versions of Android. I upload this game to Google Play as an Instant App, and try to launch it via Try Now button. In this case, rendering will lag very much, and the problem is only on devices with 5-7.x android versions, for 8+ everything is fine. Logs show that on these devices Canvas Renderer is used instead of WebGl Renderer. However, the usual launch of the game (not from Try now) on all devices uses WebGL.

I started the game on Android 5.0 with android:hardwareAccelerated=true setting, and the application did not slow down using the Canvas Renderer. So, even old devices without WebGl rendering has an acceptable speed.

Then I launched the game on 8+ devices with the android:hardwareAccelerated=false First, the device began using Canvas renderer instead of WebGl. Secondly, the rendering has become clearly slow down.

Proceeding from all this, I am almost sure that the problem is only in configuring hardwareAccelerated setting.

In this case, the question arises. Why the Instant version of the game disable the hardwareAccelerated setting, and does it only for 5-7.x devices? Are there any other reasons that WebView has slow rendering speed only in the Instant version and only for 5-7.x devices?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • So the attribute in your 3rd statement, setting `android:hardwareAccelerated=true`, solved the *slow down* for your instant app for pre-O? – TWL Jan 02 '19 at 17:36
  • Yes, this setting solved slow down for pre-O devices when I installing game as usual apk. When I start same build uploaded to Instant Apps, I have slow speed on pre-O with hardwareAccelerated=true setting. – Pavel Katskel Jan 03 '19 at 05:15
  • Oh, so that only fixed it for the installed app, not the instant app. True or false, webview on your instant app is still slow. – TWL Jan 03 '19 at 05:17
  • I can assume that for some reason Google has disabled this option for pre-O devices because 8+ devices have the same behaviour when I disable option manually and start as usual apk, not from instant. – Pavel Katskel Jan 03 '19 at 05:24

0 Answers0