Play1c is a starter project that is meant to explain how to share code, the data layer especially across platforms. It’s a set of minimalistic apps for iOS and Android that you can use as starter apps for your own projects. Start with Play1c and start renaming, changing, adding, and hacking.
Quick Start – The Short Version
Make sure you have Android NDK installed and ndk-build available. The NDK needs to be in the PATH.
git clone https://github.com/yevgenyk/Play1c.git
iOS and OS X
ios-search.xcodeproj is the iOS project, it should just work
tests.xcodeproj is the OS X unit test, set up a new scheme, and point working directory to tests subfolder
in terminal, run ndk-build
which will build the native shared libraries used by the android app
in terminal, run ./gradlew assembleDebug
Optionally enable buildNative command line building by providing a full path to ndk-build inside app’s build.gradle
The longer version – for people who can read a few paragraphs – with pictures!
http://codingsimplicity.com/shared-c-layer-with-objective-c-and-java-using-jni-tutorial-part1/ – the iOS and OS X, part I
http://codingsimplicity.com/shared-c-layer-with-android-using-jni-tutorial/ – the Android, part II