Sunday, October 27, 2019

It is 2019. How do you develop a native Android app?

Back in 2011, my first attempt on porting to Android was to compile the existing code-base as-is, in Objective-C. With a third party Stella-SDK you could pretend your Android Device was an OpenStep device, very much like an iOS device. However, this never fully worked, so had to be abandoned.

The second approach is the approach I am using to this day, for creating my Android portfolio: Use a sliver of Java, and write the rest in C and C++. And you can use JNI and android_native_app_glue.h to bridge between them. The sliver of Java came in the form of the NativeActivity class, from which you derived your application activity. Building was initially done with ant and ndk-build, but I've moved to AndroidStudio since then.

Skip forward to 2019. I am considering an Android port for my Windows/Linux title Hexa Trains. Unsurprisingly, this is a C/C++ code base, so it would entail another native Android port. Is Java's NativeActivity still the way to do native app development?

Google has been pushing Kotlin for quite some time. I've always held off on that. I wonder if it is still something that has Google's focus, or did they move on from that already? But I guess Kotlin and NDK is an option?

I guess most (sane) gamedevs just use Unity and be done with it?

No comments:

Post a Comment