Cordova stuttering on Android

Post » Fri Jun 02, 2017 6:30 pm

I see the same behavior just using the flappy bird clone template without any modifications. If I do the live preview feature, the game runs on my phone in the chrome browser and is very smooth.

However, if I use the build service to get a debug apk and run it on my device, the movements of the bird are very jerky and uneven when running in the default webview.

I have a galaxy S6 and both my chrome browser and web view are up to date. I am running android 7.0
B
14
S
6
G
6
Posts: 27
Reputation: 4,104

Post » Fri Jun 02, 2017 6:57 pm

Just to add a little more info to this issue.

This time I downloaded the cordova project and built it locally. First I created an empty cordova project from the command line and just copied in the www folder. It ran much smoother and didn't seem jerky anymore.

I then replaced the config.xml and added the config.json that was supplied with the cordova build and rebuilt the app. It installed a bunch of components through npm that is not in the default cordova app. After installing this version the app was having similar issues, with the animation appearing jerky, although it might not have been as bad. Still very noticeable though.

I am using cordova 6.4.0, java 1.8.0_121, and node 6.10.1. I have also kept my android sdk up to date.
B
14
S
6
G
6
Posts: 27
Reputation: 4,104

Post » Fri Jun 02, 2017 8:33 pm

Interesting. What plugins were installed from npm the second time ?
B
19
S
8
G
3
Posts: 34
Reputation: 2,982

Post » Fri Jun 02, 2017 10:20 pm

Here are the plugins that were installed from the build service config.xml

Installing "cordova-custom-config" for android
Installing "cordova-plugin-file" for android
Installing "cordova-plugin-compat" for android
Installing "cordova-plugin-httpd" for android
Installing "org.apache.cordova.inappbrowser" for android
Installing "cordova-plugin-statusbar" for android
Installing "cordova-plugin-wkwebview-engine" for android
B
14
S
6
G
6
Posts: 27
Reputation: 4,104

Post » Sat Jun 03, 2017 2:39 am

Ashley wrote:
DarkSide110902 wrote:I have performance problems too. I exported C2 project using crosswalk and got FPS around 60. Same project using C3 export got fps in the 50s and stuttered a lot.

C2 and C3's runtimes are nearly identical, so this is odd. I'd suspect it's random variation or the test mechanism more than Construct.


Sorry I don’t think I was clear. I imported the project into C3 and created apk using the official C3 Debug Build (without Crosswalk). The performance was better with Crosswalk than without it.


I also just experimented with live preview and the performance was similar to what everyone is experiencing in this thread. Remote Preview using Chrome browser was very smooth with stable 60 FPS. Creating apk using the debug build, the FPS was in the 50s and stuttered a lot.

The performance in remote preview in chrome is a lot better than the apk.
B
12
S
4
Posts: 28
Reputation: 894

Post » Sat Jun 03, 2017 12:45 pm

rhg1968 wrote:Here are the plugins that were installed from the build service config.xml

Installing "cordova-custom-config" for android
Installing "cordova-plugin-file" for android
Installing "cordova-plugin-compat" for android
Installing "cordova-plugin-httpd" for android
Installing "org.apache.cordova.inappbrowser" for android
Installing "cordova-plugin-statusbar" for android
Installing "cordova-plugin-wkwebview-engine" for android


Can you narrow down precisely which plugin is causing the choppiness?
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454

Post » Sat Jun 03, 2017 6:43 pm

I definitely think I found the culprit. I once again started with the flappy bird clone from the C3 home page.
1) I downloaded the zip with the cordova project.
2) I create a new cordova project from the command line: cordova create birds.
3) The only plugin with the default project is the whitelist one.
4) I replaced the www folder in the new cordova project with the www folder from the zip file
5) I built the app and installed it on my galaxy s6.
6) The game runs very smoothly using the default chrome web view on my phone.

7) I changed the package name in the config.xml file so I could install the game with new plugins side by side on my device.
8) I added the plugin cordova-plugin-wkwebview-engine to the project.
9) I rebuilt the app and deployed it to my phone.

Results:
The game ran smooth without any additional plugins using the default chrome web view, but adding the cordova-plugin-wkwebview-engine plugin caused the choppiness to appear, and it is very noticeable.
B
14
S
6
G
6
Posts: 27
Reputation: 4,104

Post » Sun Jun 04, 2017 12:04 pm

That's weird, the plugin should only affect iOS!
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454

Post » Sun Jun 04, 2017 12:31 pm

Will exporting to older versions of Android (4.4) be implemented? Exporting only to 5.0 or higher, the game achieves only half of the devices it should reach.

I already wanted to publish my game that I created in C3. But there are some problems that are holding me back. :/
Hi I am Samuel :)

My google play
B
39
S
10
G
1
Posts: 125
Reputation: 3,181

Post » Sun Jun 04, 2017 1:36 pm

When the plugin gets added it says it's the webview for android in the description as it is being added.
B
14
S
6
G
6
Posts: 27
Reputation: 4,104

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: lemo and 1 guest