When I first blogged about bringing your HTML5 games to Android I showed you how to run your HTML5 games into Android Studio in a device simulator
, but now it’s time to make them run on an actual device, like my Huawei as you can see in the photo:
Well, it’s not just a matter of plugging your phone with an USB cable and select it from available devices, you will have to enable debug testing on your phone first. You won’t be able to run your own games on your Android devices until:
* Open up your device’s settings
* In settings screen scroll to the bottom and tap “About Phone”.
* At the about screen, scroll to the bottom and tap on “Build number” seven
Finally your phone will be enabled for debug and will be able to run the game. But it’s not over yet as we want to custom the splash screen. There are a lot of splash screens and icons available, according to the resolution your phone supports.
Look at these folders (and the path), each one contains an icon or a splash screen.
These are the files I edited and saved with Photoshop, both splash screens and icons now have been customized.
Wonder what to do with the
folder? It contains a file called
which will be very useful to edit some more information:
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<preference name="loglevel" value="DEBUG" />
<param name="android-package" value="org.apache.cordova.whitelist.WhitelistPlugin" />
<param name="onload" value="true" />
<allow-intent href="market:*" />
Math match game by Emanuele Feronato
<author email="firstname.lastname@example.org" href="mailto:email@example.com">
Apache Cordova Team
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
With our game running on an actual phone, next time I’ll show you how to build it and add it on the store.