I want to thank the guy from Corona support (a russian bloke, “Bektur” I think his name was) and Rob M. too. This morning I got the Native Android app (my first) working and not a minute too soon. Thanks for your help!
Just for your information, here’s why I had to convert my Corona SDK app to Native:
In my original (SDK) app I’m using the OneSignal plugin, to add support for push messaging. My client asked if I could add a custom notification sound. Basically this should be no problem, and for the iOS version it took about 5 minutes to get it working. But for Android the custom audio file had to be placed in the APK’s /res/raw folder. Corona SDK does not support that. Not sure why that is, or why OneSignal dictates the sound file to be at that location, but it is how it is.
So I first tried repackaging the APK that was created by the Corona Simulator (unpack the APK, add the sound file to the correct folder, repackage, realign and re-sign the APK) but that doesn’t work. Every asset in the APK is accompanied by an index (jar) that is created during build, so if I add a file afterwards, it just isn’t visible from within the app.
So I had to use Native to make this one working… just to be able to put a single file on a certain location in the APK… talk about a waste of time…
Anyway, I had quite a steep learning curve to overcome the last few days, having to work on a Mac (I’m a Windows guy), fiddling with gradle build scripts, adding the required Corona plugins, adding dependencies for those plugins, dealing with the strangest error messages and all that right in the middle of Corona’s transition from Enterprise to Native, which caused many online resources and howto’s to be unavailable (a lot of 404’s).
I now remember why I am so happy with Corona SDK. It’s a safe environment that shields you from having to fiddle with native sh*t. The time to market is so much faster when not having to deal with native hassle, build scripts and cross-platform issues. I’m so spoilt by Corona SDK I found myself being such a noob when I had to go “back” to Java.
Anyway, thanks again! I hope you guys add some support for adding files to Android’s /res/raw folder in Corona SDK in the future.
Regards,
~Rob