App works well in simulator, all platforms. Installed on Samsung SIII, the splash screen shows, then goes blank.

After 6 months of long hard work I have an app that works flawlessly in Corona simulator in all platforms.  But when I install it on my Samsung Galaxy SIII, the splash screen shows briefly then the screen goes black.  

Previously, before I learned of the (build.settings) file and the (Default.png), the app would show  scene001.lua  garbled then a “touch screen” sequence in scene001.lua without a problem,  But then swiping to scene003 was in dis-array and would freeze.

My only previous experience with programming was in “basic” and “q-basic” many years ago.  I know that I have omitted something, but I am having difficulty figuring it out. There are 51 scenes in the storyboard and I am not sure that is even the “best” format.  The compiled .apk is 208 MB.  I just compiled a 12 MB .apk of the first two scenes with the same result

I have the build.settings, config.lua, and storyboard.lua files included in the working directory.  Debug complains about the storyboard call, but no more than it does in any of the Corona “sample apps”.

It has been a real joy coding my app.  Hopefully I can get it completed and accepted. 

Thanks in advance for any help.

Sid

There are many reasons why an app will have errors on a device when it runs fine in the simulator.  The biggest one is a file name problem.  Device’s are case sensitive and the simulator is not.  However without knowing what the error is, it’s going to be really hard to guess what the problem is.

I suggest looking at the device’s console log and see what errors are going on.  If you don’t know how to look that up, then this tutorial will help you: http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

Rob

That sucks, can only agree with what Rob said. Testing on the simulator for 6 months is crazy though, you learned the hard way that you can’t really trust what is working on the simulator until is has been tested on a real device

Gooner87,  

I made the mistaken presumption that Corona Simulator was just that, “a simulator” WRONG

I guess I know “nothing” and can’t tell what (on the internet) is antiquated material and what is “up to date”

I did find the “Ultimate config.lua” but somehow found myself using something totally different.  (I made it work through trial and error)

I am a nuts and bolts kind of a guy and couldn’t find anything about  the ABC’s 123’s or the nuts and bolts.

I am using notepad ++ as my “text editor”  It is easier to see and more intuitive for me. I have owned a computer since they were first released to the public.  (pong was HOT STUFF)  on a magnavox oddesy

QUESTIONS:

What is the Main.lua supposed to contain?

Is “Storyboard” a good format to follow? (works pretty well in CORONA SIMULATOR"

What is the best “config.lua” to use for cross platform compatibility?

What is “StoryBoard.lua” supposed to contain?

Is there a StoryBoard Android app that I can open in Corona Simulator and my text editor to see how things work?

If I compiled a Corona Sample app for my SIII, would it work?  (just thought of that).  I’ll try it :slight_smile:

I have 640 items in my master file that compiles to over 200 MB

I started out using 2048 x 1024 @2x  resolutions and have reduced to 1024 x 512 @2x

For device testing, I have cut back to one simple scene, compiled it and uploaded it to Google Drive.

Then accessed it on on Google Drive with my Samsung SIII phone and used the android installer.

The only thing that works is the Default splash screen and not one additional simple graphic scene. (boy do I have a problem)

On my first try to install it, (before I knew about a default splash screen)  I copied the compiled *.app file directly to my  SIII,

Then installed it.  The opening scene displayed but the audio was garbled.  The second scene displayed, but was jumbled.  I have several items that are situated in appropriate places.

I am 71 years old and should be lined up in the EXIT LINE.  But I have decided that life begins with each new day. And ends when tomorrow doesn’t arrive. I plan on living until I pass 100.

My little App is a story aimed at young children about living on a family farm in the 1950’s.  And it’s darn cute even if I say so myself.

Thanks

Sid

I come from a basic background also. main.lua can contain as little as one line of code to send you to the next file or could contain your entire app. I would keep storyboard for your current app but would move to composer for the next app. as Rob said double check all your filenames nine times out of 10 that’s where the problem lies

 I have been “case” conscious the whole time, but I definitely will check again.

Thanks,

watch your terminal window it will show a warning if there’s a case issue

From what Rob said, I gather that there is a way to check the errors on the target device.  Am I correct?

yes but I’ve never done it. I have my own code that lets me view it as it’s happening on the device. sorry not yet ready to release to the public

Sid - Correct.  In fact, “Rob The Man” wrote a great article some time back here: http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

Skip to the bottom and look at the ‘Android’ section which will take you to a second page for installing the right tools.  

Once you get it going, you’ll find that ‘adb logcat’ is your best friend for debugging on android devices.

Cheers,

Ed

Thanks Ed

Hey Sid, you’ve got a great story.  I’m thrilled to see you jumping into this.  As for your specific problem:

The simulator can’t mimic hardware, nor can it mimic device specific behaviors, like case sensitivity or things that need SDK’s that only work on the device, like Facebook.  This is why it’s imperative that you learn how to read your device’s console log as there are too many things that Corona can’t actually mimic.

Now for your questions:

What is the Main.lua supposed to contain?

This is a rather loaded question because it’s possible for some apps that it contains the entire program.  But I would recommend doing the following in main.lua:

  • Setup any hardware and system handlers like:
    • system events (suspend, resume, etc,)
    • keyEvent handling (catching the back key on Android)
  • Initializing any features like ads, Facebook etc.  Their callback listener functions would be in main.lua as well as their calls to .init() or .login().
  • load any sounds that will be used throughout the app.
  • call storyboard.gotoScene() to your splash or menu scene.

I tend to not do too much more there, though I have to admit my first game was entirely in main.lua.  That code is awful and a pain to maintain.  I should have learned about Storyboard much earlier.

Is “Storyboard” a good format to follow? (works pretty well in CORONA SIMULATOR"

Going forward, we recommend using the composer library instead of storyboard.  It sounds like for this app, you’re probably to vested in storyboard to change it out.  The composer library is really storyboard 2.0 and is very similar, but its different enough it’s not just a drop-in replacement.  Storyboard is a pretty good tool for games that have multiple screens.

What is the best “config.lua” to use for cross platform compatibility?

Well since I wrote the Ultimate config.lua (see: http://coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/ and http://coronalabs.com/blog/2013/09/10/modernizing-the-config-lua/)) I’m rather fond of it.  It makes Letterbox apps fit screens picture perfect, but it has its drawbacks too.  We recently learned that on Android if you try to support both Portrait and Landscape and swapping orientations, the content area’s shape changes, but the config.lua doesn’t re-evaluate.  You have to make some positioning adjustments to make it work.   The Ultimate config.lua also requires you to think a bit differently about how to position things.

The other config.lua that I would consider using is a fixed content area like 320x480 but just make sure your backgrounds are 360x570 and realize that the top left corner is not 0,0 and the bottom right is not 320x480.  You have to use display.screenOriginX and display.screenOriginY to reach the top left corner and display.actualPixelWidth, display.actualPixelHeight to reach the bottom right corner.

What is “StoryBoard.lua” supposed to contain?

You shouldn’t have a storyboard.lua file.  This will create issues with the built in storyboard module.  Of course on device’s its case sensitive and storyboard.lua and StoryBoard.lua are different files on device, same files on the simulator.   That said, we have open sourced our storyboard module as we are planning on removing it from the core.  If that’s why you have a storyboard.lua, it should have the content that we put in it that you downloaded from our github.com repository. 

Is there a StoryBoard Android app that I can open in Corona Simulator and my text editor to see how things work?

There is a Storyboard sample app in the CoronaSDK/SampleCode/Interface folder.

If I compiled a Corona Sample app for my SIII, would it work?  (just thought of that).  I’ll try it :slight_smile:

Yes, you should do this.

Rob

$16*

/developer/month
(Billed Annually)

 

for upgrade

What exactly does this mean?

$16.00 per month for a year, with an annual contract?

or are they going to fool me with the $192.00 charge up front?

 

My Starter status won’t allow me to do any more test compiles.  (I think I’ve messed it up)

 

Also opening the DeBugger first, freezes the Corona Simulator 

 

Is there a way to get a “clean start” with Corona Starter?

 

Oh, by the way, I have used the “BounceAnimation” routine from the fishies.lua.  I have nested it in a listener/timer to get a much desired delay.

With the listener in place, I can’t find a way to unload the “BounceAnimation”.  But without the nested listener, in other instances, no problem unloading.

 

All your help is really appreciated. But I’m not “out of the woods” yet!

Thanks

1.  $16 per month means that when you upgrade to Basic, you will be charged $192 for the year.  After a year you will be billed the next $192.

  1. I don’t understand what you mean by it wont allow you to do more test compiles?

  2. What do you mean by opening the Debugger first?

  3. You can always uninstall and re-install Corona SDK.

Rob

Rob,

Wow, your response time is amazing, and greatly appreciated :slight_smile:  I didn’t even expect a response today.

(Corona Simulator / file / Build for Android )  which I assumed was a “test compiler” doesn’t function anymore.  It wants a password, and won’t accept it when I give it.

I tried un-installing and re-installing Corona (no change)

Your instructions below:  “open corona terminal first”  I couldn’t find terminal so settled for " debugger"  (my bad)

I always get “Corona Simulator output” up when I start the simulator.  Are “terminal” and “simulator output” different things.

Viewing Error Messages

There are various ways to see error reports while developing with Corona. One is to use the  Terminal  (Mac) or  console window  (Windows) to view diagnostic output and the value of print() statements from within your code. While this practice is considered “old fashioned” to some, it can be quite effective.

On Windows, the console loads automatically alongside the Simulator, but on Mac OS X, you need to “link” the Terminal to the Simulator. If you’re running the Corona Simulator by itself, please close and quit the Simulator for a moment — we need to reload it so the Terminal works in unison. Now, instead of opening Corona Simulator  from the application folder, open Corona Terminal. The Terminal will load, then it will automatically open the “Corona Simulator Welcome Window” where you can choose the  Simulator option. On Windows, the equivalent of the Terminal is the  console window , which will load automatically when you start the Simulator.

Still “lost in the woods” I am.

Sid

Rob,

I think my first mistake was trying to “micromanage” the original Corona install.  (I wanted to do things “My Way”)  oops

Are you on a Mac or Windows?

Can you post the text of the message where it’s asking you for a password?

Rob

I am using windows 8.1

Here is a link to a screen shot on my Google Drive

https://drive.google.com/file/d/0B4MNtmTaseboc2VQaEppR1Q2QnM/edit?usp=sharing

I pasted it into my browser and it worked

Sid 

You need to make the permissions on it public.  I can’t see it.

Rob

Hopefully this gets what you want to see?

https://drive.google.com/file/d/0B4MNtmTaseboUzM0WVRjeGpGWWM/edit?usp=sharing