三星Galaxy S4和Phonegap问题 [英] Samsung Galaxy S4 and Phonegap Issue

查看:177
本文介绍了三星Galaxy S4和Phonegap问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Phonegap编写应用程序,该应用程序包括使用HTML5的画布。

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

当我在Eclipse的Android模拟器上运行应用程序时,一切都很好工作)。

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

当我连接Galaxy S4并运行应用程序,它加载,显示画布很好,但几秒钟后,整个屏幕变蓝。

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.

我放置了javascript的alert();'s,它们似乎在屏幕变蓝后工作,但仍然无法再使用。

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..

Galaxy S4使用Android 4.2.2。从Eclipse,我运行它作为版本2.2,4.2.2和我尝试更多的版本,但它不解决。

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?

推荐答案

我在Galaxy S4上遇到同样的问题。 HTML Canvas绘图不显示在webview中,但它是在Safari浏览器中工作。 Galaxy S2,S3没有相同的问题。

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);

但是它很慢。它与PhoneGap无关。

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

我希望有人找到解决方案同时启用H / W加速和画布绘制。

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

这篇关于三星Galaxy S4和Phonegap问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆