Exporting Amazon web apps

1

Stats

5,990 visits, 10,014 views

Tools

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 15 Jul, 2013. Last updated 28 Feb, 2019

Amazon devices, like the Kindle Fire HD, are an Android-based platform but have their own separate app store. It also now supports publishing "web apps" powered by the Chromium browser engine - a great way to publish a HTML5 game as a native-looking app with good performance and features.

Before you begin

You should make sure your game supports multiple screen sizes to cover all existing and future devices which could have different sized screens. It should also of course support touch controls.

You will need to host your game on a server - like a Chrome or Firefox OS "hosted" app. However thanks to Construct 2's offline support the games should continue to work just fine even when offline, and the offline cache will also save you lots of server bandwidth. Then you can also update your game simply by uploading again to the server. Note it is not recommended to use a free file host like Dropbox or Google Drive, since the bandwidth limits of these services could make your app inaccessible if it becomes popular. There are lots of cheap file hosts around - even paying a small amount will get you a considerably more reliable server.

First-time setup

You'll need to set up an Amazon developer account. Head to developer.amazon.com, register an account, then sign in. You may be asked to fill in some information about your tax identity; be sure to fill it in correctly, especially if you plan to use monetisation features.

Adding a new app

Before you export from Construct 2, you need to know your submission's verification key. Follow these steps to find it out.

In the Home section of the Amazon Developer website, hover over Add a New App. A dropdown list should appear, allowing you to choose either a new Android app or a new Web app. Choose the Add a new Web app option, since Construct 2 games are all made using web-based HTML5 technology.

Enter the required app title, a category, and some support information. Press Save and the rest of the tabs along the top should enable. Fill them all out as appropriate for your game.

Open the App File(s) tab. You'll find your app has been given a verification key. This is used to ensure you really are the publisher of the game you are trying to submit. Take a note of this. Note you do not need the part which says "verification_key", nor any of the double quotes or commas: just copy the section which is in the format: 00000000-0000-0000-0000-000000000000

Testing

You can test your app with the Amazon Web App Tester. Install the app to your device and you can test any URL using the full performance and features of the Chromium-powered browser engine that runs Amazon Web Apps. You can enter a preview over Wifi address in the Web App Tester to test quickly before exporting. After uploading your game you can also enter the web URL and test it from there as well. You can save some URLs for quick testing later.

Note that to test with the full performance and features, use the Amazon Web View button. The Android Web View is very slow in comparison, using the system web view which is not suitable for games at this time.

Exporting from Construct 2

In Construct 2, choose Export project and select Amazon Appstore. After the usual export options, you'll be prompted to enter the Verification key which you found earlier. The Launch path should also be the name of the main page, which by default is index.html. Change this if you rename your main page.

You'll also need to enable in-app purchases or geolocation if your game uses either of them. Note if you enable them, your host must be a secure server, running over the https protocol. This can be a little trickier to set up than an ordinary file host. Contact your hosting provider for help on how to set this up if you need it; you may need to look specifically for a host that supports secure servers.

Once exported, your export folder should have all your game's files. It is effectively an ordinary HTML5 website export, but with an additional file called web-app-manifest.json, which contains information for the Amazon Appstore.

Publishing

Upload all the exported files, including web-app-manifest.json, to your server. (If you don't know how to do this, contact your host.)

Try to visit the web-app-manifest.json file on your server directly, to check it is served correctly. E.g. visit the URL mysite.com/mygame/web-app-manifest.json in a desktop browser. If an error appears, check your server MIME types are set up to allow .json files to be served. They should be sent with the MIME type: application/json. Once you've got it working, you should be able to see its contents in the browser, which is a small amount of text including your verification key.

Go back to the Amazon Developers site, on your submission's App File(s) tab. Enter the URL to the manifest file again for the Manifest field (e.g. mysite.com/mygame/web-app-manifest.json). Click Verify and hopefully it will tell you everything is OK.

Fill out the rest of the tabs, and then you should be able to press Submit app!

  • 0 Comments

Want to leave a comment? Login or Register an account!