Android Native Activities

Well, making progress, I now have it pausing, resuming and terminating nicely(ish). The boss has said yes to sharing the code. So what is the best way of doing that. At the moment all the native activity stuff is in it’s own folder along side the android one (ie src/video/android_native) so it is isolated. The main caveat is that I do not know autotools, so I have knocked up a CMake file, that along with a toolchain file (from http://code.google.com/p/android-cmake/) makes it easy to compile for Android.

Other issues are:
You have to have SDL_main as you main function
You will probably have to have a launcher stub to dlopen your library if you also use other .so’s.

But other than that, we have a very non-trival application using it, and it seems to work well.

There are huge chunks missing (sensors etc), but lets share it :slight_smile:

Hm, it would be but I’m getting HTTP 502’s from code.google.com at the moment, I’ll try again later.

Just trying to get it uploaded, once it is, it will be

http://code.google.com/p/sdl2-android-native-activity/

I’ll follow the other cmake discussion, and it would make more sense to use that instead of this very nasty quick hack cmake file I’ve done. So at some stage, I will move it to using that (or someone else can :slight_smile: )