Export Construct 2* Game to Android* with Crosswalk*

Adapted from a Scirra Forum Post: here. Thanks to Ashley for the original article.

Crosswalk is effectively the Google Chrome for Android browser turned in to a wrapper for apps. Since it's based on a real browser it has support for all the features Chrome has, including WebGL, Web Audio, web fonts, and more.

Crosswalk compatibility

Since Crosswalk is based on Chrome for Android, it supports the same features. As with Chrome for Android, it also only supports devices with Android 4.0+. However this is the vast majority of devices and soon older versions will disappear completely.

Crosswalk also makes some minor changes compared to the Chrome for Android browser:

  • Obviously, there is no address bar or tabs feature; the game runs in fullscreen as if it were a native app. This means there is also no need to use the Browser object's Request fullscreen action.
  • Chrome for Android can only start playing music in a touch event. Crosswalk can start playing music at any time.
  • The Browser object's On back button, On menu button and On search button trigger In Crosswalk on devices which have these buttons. In Chrome for Android, they never trigger.

Testing for Crosswalk

The easiest way to test your game or app is to run it in the Chrome for Android browser. Using Preview over Wifi is a quick and convenient way to test on a different device. Since Crosswalk is based on Chrome for Android, it should run very similarly in terms of features and performance, except for the differences noted in Crosswalk compatibility above.

It is still useful to test with Crosswalk itself to check how the differences noted in Crosswalk compatibility affect the game. For this, the Crosswalk Player apps can be used. You can download the APKs directly from here:

Crosswalk test app .APKs

Note that since these are not from the Google Play Store, they will not auto-update. Be sure to periodically check for updates from the above link.

Enter the preview-over-Wifi URL in to the Crosswalk player app to run the game with Crosswalk. Note however that the Browser object's On back button, On menu button and On search button triggers do not work in the Player apps; they will only work once you have built the app using the XDK, which is described below.

Building your app in the XDK

To build your app, you need to use the Intel XDK. Click the link to download the XDK and install it.

Once installed, run the Intel XDK. Register a new account if you need to, and log in.

Now export your project from Construct 2 (File > Export To...), choosing the Android option.

Choose Android in Construct 2
Click Next. Pick a location to export the project to. Take note of the location of the project. Click Export.

Navigate back to the XDK. Open the Projects Tab. Click Start A New Project.

Start New Project XDK

Choose Import an Existing HTML5 Project.

import html5 project

Import the root directory of Construct 2 exported Project and name your app. After you've completed that, click Create in the bottom right.

Go to the Project Tab (if you aren't already there). The project settings will appear here.

Project Settings in Project Tab

Expand Build Settings. In this screen you can edit the app details, such as its name and version.

Expand Plugins and Permissions. Be sure to choose the Plugin options carefully. If you leave too many of these on, your app will requests lots of permissions, which can look suspicious. You should set them all to "No", except:

Accelerometer (if you use the device motion from the Touch object)
Camera and Capture (if you use the User Media object with camera or microphone input)
Compass (if you use the device orientation from the Touch object)
Events should always be "Yes"
Geolocation (if you use the Geolocation object)
Splashscreen if you want to show a splash screen while loading.

Expand Launch Icons and Splash Screens to upload icons and splash screen images in a variety of sizes.

Now switch to the Build tab. Click the Crosswalk for Android 'Build' button.

build for crosswalk

Click Build App Now. It may take a few minutes for the app to be built. However once it's finished, the .APK will be available for download. It will also email a link to the download to the email address associated with your XDK account, and you can optionally email links to additional addresses. A convenient way to test the APK on a real device is to email the link to an email account that you can access from the device itself. Then you just need to check your email on your Android device, click the link, and download and install the APK.

You'll be given the option to download both x86 and ARM builds. The majority of Android devices are ARM, so for testing you'll likely want to use that one - but be sure to submit both to support the widest range of devices possible. Now you have your APKs ready to submit to the Google Play Store! You can get going with this from the Google Play Developer Console.

For more help or if you have any questions specific to Crosswalk, you can also visit the Intel HTML5 tools forum.

For more complete information about compiler optimizations, see our Optimization Notice.


Ryan R.'s picture

Thanks for sharing :) 

Phil S.'s picture

Oh, I've forgotten, if I will not fix it Google Play promissed to delete my application from Marcket

Phil S.'s picture

I've uploaded my application into Google Play, but after one day there were error: the error says that my application uses OpenSSL library which is vulnerable, and Google  Play recommends to use OpenSSL library 1.0.1h, 1.0.0m и 0.9.8za, how should do this???

Thank you

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.