android html5 game slow but in browser normally works

485 views
Skip to first unread message

Foozzi Mijatovic

unread,
Feb 10, 2014, 8:43:25 AM2/10/14
to phon...@googlegroups.com
Please tell me why my app html5 is significantly slower than in the browser?
my command:
1. phonegap create apps
2. cd apps
in apps/www/ - js files and index.html then I performed $ cordova platform add android and then $ phonegap run android
help pls

jcesarmobile

unread,
Feb 10, 2014, 9:15:32 AM2/10/14
to phon...@googlegroups.com
because webviews are slower than browsers

Foozzi Mijatovic

unread,
Feb 10, 2014, 12:56:39 PM2/10/14
to phon...@googlegroups.com
there are other ways to make the game did not work so slowly?

Kerri Shotts

unread,
Feb 10, 2014, 4:01:38 PM2/10/14
to phon...@googlegroups.com
What version(s) of Android are you testing on? Are you using the Canvas tag?

There is a known issue on 4.4 when using the new Chromium-backed web view that the Canvas tag is no longer hardware accelerated, and as such, games that use it will experience severe slowdowns. Last I knew, there was no fix.

Terribly frustrating -- 4.3's webview had its problems with the canvas tag as well, but at least it was accelerated. Now 4.4's web view fixes those particular problems (ghosting, etc.), but now loses the acceleration. *sigh*

Short of a fix being available and easy to implement, atm, HTML5 games using canvas are DOA on Android 4.4. Very, very frustrating.

Foozzi Mijatovic

unread,
Feb 10, 2014, 5:00:18 PM2/10/14
to phon...@googlegroups.com
version android 4.4.2 

yes - i'm using canvas tag (look pic 1.)

понедельник, 10 февраля 2014 г., 23:01:38 UTC+2 пользователь Kerri Shotts написал:

Kerri Shotts

unread,
Feb 10, 2014, 6:01:07 PM2/10/14
to phon...@googlegroups.com
Yeah, I'm afraid you're toast under android 4.4 due to that particular bug.


Very frustrating that there doesn't seem to be any movement on this bug. :-(

Be sure to star the issue when you take a look so the bug gets plenty of votes.

Foozzi Mijatovic

unread,
Feb 10, 2014, 6:06:12 PM2/10/14
to phon...@googlegroups.com
Ok, thx Kerri.

Misu Popescu

unread,
Feb 11, 2014, 9:36:00 AM2/11/14
to phon...@googlegroups.com
Hello,

first, try to not mix phonegap and cordova CLI. If you want to use only phonegap, you should use only 3 commands:

phonegap create my_app_name
cd my_app_name
phonegap run android

The last command will add the PhoneGap Android wrapper which at this time is different from the one used by Cordova.

About your game speed, it may seem counterintuitive but I've noticed an improvement in speed by removing the android:hardwareAccelerated=true from the application tag in AndroidManifest.xml. Also change the minSdkVersion from "10" to "14".

Hope it will help,

Misu

Horst

unread,
Feb 11, 2014, 10:35:15 AM2/11/14
to phon...@googlegroups.com
AppMobi has made a accelerated canvas. I think all from AppMobi has moved into the Intel XDK, so it is free. Maybe this can help.
http://xdk-software.intel.com/

best regards
Horst

Foozzi Mijatovic

unread,
Feb 11, 2014, 1:16:26 PM2/11/14
to phon...@googlegroups.com
Oh thx Horst! I'll try it!


вторник, 11 февраля 2014 г., 17:35:15 UTC+2 пользователь Horst написал:
Reply all
Reply to author
Forward
0 new messages