Revision 2017.3060 Keywords CoronaCards, Android See also Getting Started — Android Native/Lua Communication — Android
This guide explains how to integrate CoronaCards with a native Android project.
Get the desired CoronaCards framework from the download page and follow the instructions to install it.
com.ansca.corona.CoronaView
is the main entry point — this is the view that should be added to your layout.
To use CoronaCards in the designer, you need to copy the .jar
files into the [Project Directory]/[Application Name]/libs
folder and the .so
files into the [Project Directory]/[Application Name]/src/main/jniLibs/armeabi-v7a
folder. A sample folder structure can be found on GitHub. Android Studio will show the CoronaView
as a custom view in the designer.
To use CoronaCards in Eclipse, copy the .jar
files into the [Project Directory]/libs
folder and the .so
files into the [Project Directory]/libs/armeabi-v7a
folder.
Nothing needs to be added to the manifest.
Place your Corona assets (i.e. main.lua
) into the assets
folder of your project. The CoronaView
should then use this path:
CoronaView coronaView = new CoronaView(context); coronaView.init("");
CoronaView coronaView = new CoronaView(context); // Assuming 'main.lua' and all of its assets are in a folder named 'Fishies' in the 'assets' directory: coronaView.init("Fishies/")
The licensing file needs to be put in every directory which houses a CoronaCards project or the CoronaView
that is pointing to that project will not run. This file ensures that you are authorized to use CoronaCards. Obtain a trial licensing file here.