Revision Release 2022.3683 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 Solar2D 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/")