Trouble getting started in Andoid


#1

I want to get a barebones index.html page working on both iOS and Android. I only want to use Cordova and Steroids. No Supersonic.

Here is the content of index.html, which is referenced in structure.coffee:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf8" />
    <meta name="viewport" content="width=device-width" />
    <title>Test</title>
    <script src="http://localhost/cordova.js"></script>
    <script src="/components/steroids-js/steroids.js"></script>
    <script>alert( "test" );</script>
  </head>
  <body>Test</body>
</html>

This works perfectly on iOS.

However on Android, only the javascript alert is triggered. The actual html does not display, instead I continue to see the default Appgyver logo that appears while scanner is loading – even after the alert has executed.

Obviously the page is loading on Android, since the javascript is executing. Am I missing something obvious? Is there some additional setting somewhere that I need to specify in order to get html to render on Android?


#2

Solved it. In config.android.xml

<preference name="AutoHideSplashScreen" value="false" />

From what I can see, steroids create doesn’t automatically create this file in the www/ folder. I had to grab it out of the dist/ folder and copy it there manually. For those of us who are just working in pure steroids, and not using supersonic, it would be helpful to have these files automatically setup when calling steroids create, rather than having to go digging for them…