Hi, When c2 project html5 is exported, I'm not able to run it locally because c2  checks for file:/// protocol and won't allow run. How can I disable this behaviour?
<!-- The canvas the project will render to. If you change its ID, don't forget to change the
ID the runtime looks for in the jQuery events above (ready() and cr_sizeCanvas()). -->
<canvas id="c2canvas" width="1280" height="720">
<!-- This text is displayed if the visitor's browser does not support HTML5.
You can change it, but it is a good idea to link to a description of a browser
and provide some links to download some popular HTML5-compatible browsers. -->
<h1>Your browser does not appear to support HTML5. Try upgrading your browser to the latest version. <a href="http://www.whatbrowser.org">What is a browser?</a>
<br/><br/><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx">Microsoft Internet Explorer</a><br/>
<a href="http://www.mozilla.com/firefox/">Mozilla Firefox</a><br/>
<a href="http://www.google.com/chrome/">Google Chrome</a><br/>
<a href="http://www.apple.com/safari/download/">Apple Safari</a><br/>
<a href="http://www.google.com/chromeframe">Google Chrome Frame for Internet Explorer</a><br/></h1>
You need to define what you mean by locally.
If you try to start the index.html, and you get a warning , that is C2 telling you that using it outside a browser is a bad idea.
If it doesn't run, or you get some other error then your system is set up to not run scripts which is a good idea.
If you want to run the file after export, you can google how to setup a server on your own system, or upload it to a host, or portal like the arcade.
There are many different ways to go, but again running a plain html5 game on the desktop is a bad idea.
The message is correct: the game won't run from disk. Removing the error message won't fix this, you'll just have a broken game that does not tell you why it's broken.
Above also happens when I directly run that from a computer.
I just want to disable this default behaviour.
You should use the Cordova export for Android-based apps using a webview, not the HTML5 export (which is designed for websites). Cordova already does all of that as well, so you only need to build it - no need to write the webview integration yourself.
Develop games in your browser. Powerful, performant & highly capable.
Okay, I think I got it resolved. The issue with exporting for Cordova and then using XDK is that the generated .apk gets too large; about 30mb. For those interested, here is what I did:
1. Export for Amazon - select option to run on own server
2. Created a simple Android app that basically has a webview and loads index.html as shown below. Built the .apk and instead of a .30mb .apk, I now have 5mb .apk for my sample app: