3

I'm writing an app using Phonegap, the app includes using HTML5's canvas.

When I run the app on Eclipse's Android Emulator, everything works fine (slow but working).

When I connect the Galaxy S4 and run the app, it loads, shows the canvas well, but after few second the whole screen turns blue.

I have placed javascript's alert();'s and they seem to work after the screen turns blue, but still the app can't be used anymore..

The Galaxy S4 uses Android 4.2.2. from Eclipse, I run it as version 2.2, 4.2.2 and I've tried more version but it doesn't fix.

What should I do to fix this?

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
Miko Diko
  • 944
  • 1
  • 13
  • 33
  • I'm also experiencing just S4 specific problems, but might not be related, do you test on a wide range of devices too? – Kaan Soral May 24 '13 at 17:11
  • well, I would suggest starting with google'ing "-webkit-backface-visibility" and start applying fixes, webkit on android is extremely problematic, S4 is one of the worst in terms of problems (Android 4.2.2) – Kaan Soral Jun 18 '13 at 22:44

1 Answers1

3

I'm experiencing the same issue on Galaxy S4. HTML Canvas drawing is not showing in webview, but it is working in Safari browser. Galaxy S2, S3 don't have the same issue.

In my case, when I disable Hardware acceleration, canvas works.

appView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null);

but it is very slow. It has nothing to do with PhoneGap. Probably Samsung made another bug on their implementation.

I hope someone find solution both enable H/W acceleration and canvas drawing.

user664186
  • 111
  • 4