How to make native phone apps with Construct 2 and PhoneGap

Favourite 66 favourites
Tutorial written by AshleyOriginally published on 28th, October 2011 - 15 revisions

Uploading to PhoneGap

By default, the exported icons are copied from the Icons folder in the Project Bar. Check that the exported icons are what you intend them to be.

Now select all the files in the exported directory. Right-click them and add them all to a .zip file.

Zipping the files for PhoneGap.
Rename the zip file to something like app.zip.

On PhoneGap Build, click New App. Enter the app name, and select the upload an archive or index.html file. Select your app.zip file and upload.

Wait a while for the file to upload. PhoneGap will then start building your apps! Refresh the page after a couple of minutes and you should see which apps have finished. There may be some errors, which you can investigate by clicking the red buttons.

Some results


Now you can download the compiled apps for each phone system to your computer, and transfer them to your phone. Alternatively, browse to PhoneGap build on your phone and click the links. If your phone supports QR codes, you can hold your phone up to the QR codes PhoneGap shows as a shortcut!

This feature is experimental

We're still working on integrating Construct 2 with PhoneGap, and some phones still have issues running HTML5 well. Consider this a work in progress. We're keen to hear your feedback and results!

There are two known issues when using PhoneGap:
- Android 2.x does not support multi-touch properly. Android 4 (Ice Cream Sandwich) fixes this.
- You will need to tweak for performance. Remember mobile hardware is much weaker than desktop systems, and mobile browsers tend to be less optimised. You may have to remove effects and use as few objects as possible to get good performance. For more information, see Performance Tips in the manual.

Have a go at exporting to PhoneGap and let us know how it goes!

Congratulations on finishing this tutorial!

Did you learn a lot from it? Share it now with your friends!

Share and Copy this Tutorial

You are free to copy, distribute, transmit and adapt this work with correct attribution. Click for more info.

Comments

0
Andrex 3,508 rep

"- Android does not support multi-touch yet. Android 4 (Ice Cream Sandwich) should be released soon and ought to correct this."

I believe Android has had multitouch since 2.0, might be an issue with Phonegap itself.

Saturday, October 29, 2011 at 3:19:25 AM
2
Ashley 112.0k rep

@Andrex, Android does support multitouch but unfortunately not in its browser, which is still used to power PhoneGap apps. Apparently Android 4 fixes that!

Saturday, October 29, 2011 at 3:21:23 AM
0
Andrex 3,508 rep

@Ashley Ah OK, didn't think about the WebView.

I didn't even know it was possible to use multitouch in Construct.

Saturday, October 29, 2011 at 8:47:39 AM
0
AlexmosuTSP 2,488 rep

Worked for me, no sound though. I used my HTC Desire with Froyo.
It compiled well for Android, WebOS and Symbian, but failed for Blackberry.
Nice.
Looking forward to this feature working 100%.

saludos :D

Saturday, October 29, 2011 at 10:35:34 PM
0
PixelAmp 4,176 rep

Unless it has changed, one of the primary causes of failure for building on BlackBerry is that since it is passed through WebWorks, it doesn't allow for dashes in the file name. I love that Scirra has chosen PhoneGap Build as I use it in other applications and it has been relatively stable so far. Great work!

Monday, October 31, 2011 at 6:36:03 PM
0
Havok 3,059 rep

Fantastic feature!
You guys are poised to make Construct 2 have a very bright future if you guys keep this up.
Well don!

Thursday, November 03, 2011 at 8:46:44 AM
0
sqiddster 26.4k rep

You note that the PhoneGap apps are powered by the browser - what sort of performance limitations does this cause?

Saturday, November 05, 2011 at 10:06:44 PM
-1
ludodesign 22.5k rep

Dont work for me =(
every app same error in Android

Tuesday, November 22, 2011 at 5:46:41 PM
0
MadFactory 12.1k rep

Tried this out with Bumper's Quest on an android phone. Got ~2fps but uh..hey it worked nonetheless :P

Monday, December 19, 2011 at 3:06:25 PM
0
zapmore 2,874 rep

Works well on Samsung Galaxy S, android 2.2. people, don't forget the part in the tutorial "ID must be a string in the form com.companyname.productname, e.g. com.scirra.spaceblaster." or else the install will fail, at least on android.

Sunday, February 19, 2012 at 6:50:43 PM
0
forzaerdal 2,402 rep

I have tried to upload my game with phone gap build. It say file is too large. My game only 11 mb..What is the file size limit for phone gap?

Friday, February 24, 2012 at 11:18:09 AM
0
Go2Holidays 2,198 rep

There appears to be a 10mb limit on PhoneGap filesizes. You simply have to trim your game size down a bit to fit.

Friday, February 24, 2012 at 11:34:35 AM
0
mina 12.0k rep

Great :) but the file size limit is too low, so is it possible to increase it in the future?

Sunday, February 26, 2012 at 12:34:46 PM
0
Ashley 112.0k rep

@mina, you'll have to ask PhoneGap Build, we don't have any control over their service!

Sunday, February 26, 2012 at 2:34:05 PM
0
mina 12.0k rep

@Ashley
Thank u, I thought its a common issue between both sides. so is the sound problem also under their control?

Thanks again 4 ur quick reply.
Have a nice day :)

Monday, February 27, 2012 at 7:33:25 AM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.