Samsung Galaxy S4 and Phonegap Issue

喜欢而已 提交于 2019-12-04 13:51:18

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/16480197/samsung-galaxy-s4-and-phonegap-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!