My Android CoronaCards Gotchas

Great job on the Android beta release guys!

I have two gotcha items that are covered in either the Android CoronaCards ‘Getting Started’ doc or the sample Android projects, but I still managed to trip on these the first time through  : )

1) The trailing slash (’/’) is required in the CoronaView.init() call

For example, if I have my lua project in the “assets/CustomChart” directory of the Android project, the following init call works fine…

mMyCoronaView.init("CustomChart/");

…while this call without the trailing slash (’/’) causes Corona to display a dialog saying “License File Not Found”…

mMyCoronaView.init("CustomChart"); 

2) You must override the ‘onResume’ and ‘onPause’ methods of the Android Activity or Fragment containing the CoronaView

If you don’t call the CoronaView’s ‘resume()’ method in the Activity or Fragment’s ‘onResume’ method, the CoronaView appears to never start (timers do not work, etc).  I later noticed this in a sample project and figured-out my issue.

    @Override     public void onResume() {         super.onResume();         mCoronaView.resume();     }          @Override     public void onPause() {         super.onPause();         mCoronaView.pause();     }

Thanks!

Mark