This is an open source project that I’ve started to help ShiVa developers get the latest/greatest Android SDK implementations. The goal for this project is to be a single Android project that contains the implementations for any Android SDK that you could possibly care about. There are 2 pieces to this project. The Android code is where the SDK implementations live as combinations of Java and JNI (for interacting with ShiVa). The ShiVa project is where SDK specific AI implementations go. So for every SDK implemented, there is an associated ShiVa AI model that exposes the functionality needed to use the SDK from inside ShiVa.
I often see folks posting large tutorials in the forums detailing how to implement various SDKs in Android. These tutorials are awesome and the community members involved in writing them deserve tons of credit. What happens when you start a new project though? Do you comb back over the forums, find the 3 SDK tutorials of interest and start copying/pasting all over again? What happens when the SDK is updated with breaking changes and the tutorial author is busy?
Wouldn’t it be nice if you didn’t have to copy/paste any of this code? Wouldn’t it be wonderful if all you had to do was select the SDKs that you wanted to use? I answer yes to these questions and this is why I have started this project.
As a ShiVa user, what would compel you to use this?
Before getting started, I am assuming that you’ve done the following:
Unfortunately there’s not an easy way to improve on the Developer eXperience for these essential requirements. If your existing exported ShiVa projects aren’t compiling in Eclipse, don’t expect AAIO to compile either.
Please do not comment here asking for build help, post on the ShiVa Android forum instead, the build process has not changed in AAIO.
Here is a full run-thru of how to get started using AAIO.
The source is on the github page. You can download it by clicking the zip button.
Once you unzip the project, you will have 2 folders:
This step renames the namespace of the source files and updates the build scripts with the correct NDK location on your system. Obviously you don’t want your project namespace to be com.wordpress.mobilecoder.aaio and Android All In One right? To begin, open up the android/configure.sh file, I recommend using Notepad++ to edit this file, especially make sure that under Edit->EOL Conversion it is set to Unix. If you try to edit this in windows notepad and save it out, cygwin is going to have issues when you try to execute the script.
Here is the portion of the file we’re concerned with.
#####REQUIRED VALUES##### #The name of your package. #Example: com.atari.frogger newPackage="default" #The name of your project class, this cannot contain spaces. #Example: froggerClass newName="default" #The title of your project, this can contain spaces and is what is displayed on the Android home screen. #Example: "Frogger Extreme" newFriendlyName="default" #The absolute path that contains the ndk-build command from the Android NDK #Example: "/cygdrive/C/sdks/android-ndk-r7/" newNDKPath="default" #####END REQUIRED VALUES#####
We need to edit all of the entries that don’t start with a hash sign. After finding the location of the NDK on my system, I change the values to look like this (don’t forget the trailing slash on the ndk path!)
#####REQUIRED VALUES##### #The name of your package. #Example: com.atari.frogger newPackage="com.example.aaio" #The name of your project class, this cannot contain spaces. #Example: froggerClass newName="example" #The title of your project, this can contain spaces and is what is displayed on the Android home screen. #Example: Frogger Extreme" newFriendlyName="An awesome AAIO Example" #The absolute path that contains the ndk-build command from the Android NDK #Example: "/cygdrive/C/sdks/android-ndk-r7/" newNDKPath="/cygdrive/C/sdk/android-ndk-r8b/" #####END REQUIRED VALUES#####
Finally, open up cygwin and browse to the path where the file lives and run the script
Note for the advanced: If you ever need to rename your project again, you can edit the lower portion of the script with the new values you just entered.
Fire up eclipse and select File->Import
Select Existing Android Code Into Workspace:
Browse to the same folder where the configure.sh script was and hit ok, you should see this (although obviously with whatever values you chose) at which point you can click finish:
The ShiVa libs are not included in this project, to get them you must:
If Stonetrip permits it, I will include this in the future (hint hint)
Building works like it always has.
Now that you can build, you are ready to start enabling SDKs etc. Please see the following section of the README.
If you’ve updated your ShiVa project and need to bring it into eclipse, here is all you need to do: