First of all, as this is my first post, let me introduce myself: I am mdb, a OUYA owner since a few weeks, and a spare time programmer.
I have already managed to load sketches that supports OUYA ODK (at least, controllers), with Processing IDE, using Android Mode. Could be a little tricky, as you have to re-compile the IDE, and Processing Android Mode with some modifications. But it works.
I have written a step-by-step guide
here.
I hope you could find this useful.
Regards,
mdb.
Comments
If you would not mind re-posting the steps here it would be appreciated.
http://wiki.processing.org/w/Android
I was also able to find the forums for Android Processing, and I noticed that there was a similar post there (search for "Ouya")
http://forum.processing.org/android-processing
I haven't been able to get to the page mdblabs.com/blog/ouya-processing-dev-hack/
1.-OUYA console. I have done it with a standard one, no dev, pre-release one.
2.-Computer with the Android SDK installed, ant, etc, etc.
3.-Console already set up. Follow this guide, from OUYA.
Now, follow these steps:
First of all, download the OUYA SDK (ODK) files from here, and save them in a good place (doesn’t matter where, as these libraries will be included in our Processing Sketch directory later).
We need to replace one of the files in the ODK with a newer version. Unzip the odk-x.x.x.zip file. A OUYA-ODK directory will be created. There, inside the libs directory, we need to replace the commons-lang-2.6.jar with the newest version (at the time of writing, 3.1). You can download it here. Replace the older version file with the new one downloaded.
Download Processing source code from its GitHub repository. We will need the Android Mode source code as well.
First, we will compile Processing, following this instructions.
Then, we need to modify two files in processing-android, in order to compile sketches for the 16 SDK. I followed this thread.
AndroidBuild.java, in processing-android/src/processing/mode/android/
build.xml in processing-android/core/
<available file="${env.ANDROID_SDK}/platforms/android-16/android.jar"Now, compile first the processing-android core, to generate the android-core.zip, and then, compile the whole processing-android code.
If everything finished with a “BUILD SUCCESSFULLY”, place the built Processing in your favorite directory (Applications, in my case), and run it. It will lunch the IDE and will generate the sketches directory, configured in the Preferences.
Move the whole android-mode files inside the “modes” directory inside the Processing sketches directory. (In MacOS, Documents/Processing/modes/AndroidMode)
Re-lunch the IDE. Now, you can change the mode to Android.This was the tricky part.
After this, we are ready to configure the sketch in order to include the OUYA libs.
Create a folder inside the sketch directory, name it “code”, and put in there all the ODK files.
In the sketch, import all these Android libraries, in the beginning:
Now, you can add the functions necessary to configure the controllers in your sketch as usual. Just follow the official guide from the OUYA Dev page. Program your sketch, connect your OUYA to your USB port, lunch the sketch in Android Mode, and you are done."
Anyways thanks for sharing, I'll favorite this page to look at it latter.
My compiled AndroidMode.jar can be downloaded from my dropbox in this LINK .
But I will like to add the same disclamer that mdlabs. (It's not fully tested, try it at your own risk).
It was compiled on Windos XP, also tested it at Win7, soon will try on Linux (32bits all),
I guess it will work as .jar seems to be multiplataform in most of the cases.
Also you don't need to compile Processing, but you need to download the source files cause you will need some of them to complie the android-core, because the build.xml look for them. In that step you will need to set an enviroment variable for ANDROID_SDK, with the path to the sdk location, or specify it on the build.xml.
Finaly I don't think It's necesary to put the ODK in the sketch directoy in "code", because it seems that I'm not doing nothing with it, as I couldn't load the OuyaController class, and got to erase all the refrences to it in my Processing sketch in order to make it run.
I did get the values for the inputs and controller IDs, and can use them on the sketches, and practically just had to deleted "OuyaController." from each line, and replace the the log.i for println.
But I think something is missing to load the complete ODK, and that is needed to do the in app purchase/donate. If someone wanna do that part and share it will be great.
I'm really glad that the controller part it's working cause my first motivation for getting an OUYA, was to have an easy to carry and set up device for showing Processing sketches on interactive art expositions.
Having tested it yet, but in theory it's posible, as the other stuff seems to work as expected.