As has become usual around these parts, we are going to look at Android 4.4 from a game dev perspective.
New Memory Analysis Tools
The Android engineers have put a lot of work into memory management in Android 4.4, so that even devices with 512MB of RAM don’t struggle. Us developers have fancy new tools to analyze and battle memory issues that crop up in our apps. procstats and meminfo allow you to gauge memory usage over time via ADB. For on-device memory stats, there’s a new developer option in
Settings > Developer Options > Process stats which visualizes the procstats results in a more high-level manner. Fancy!
You can now do a high-quality screen recording of your app directly via DDMS. The video gets pulled down from your device and is encoded in MP4 format. Audio is sadly not recorded, but for marketing videos you usually add your own audio anyways. I haven’t tested this myself yet, so ymmv.
Since Android 4.0 (i think), you could disable the on-screen navigation bar to let your app use all of the screen. An example of this can be found when playing Youtube videos in fullscreen mode. For games, this wasn’t a viable solution, as the navigation bar would be shown again as soon as a user touches the screen.
The new immersive mode solves this issue, and is hence fit for games! In addition to the usual fullscreen flags (which libgdx sets for your automatically), you only specify one more flag called immersive sticky, and your game will use the entire screen. To get the navigation bar, a user simply swipes down from the top of the screen. With the immersive sticky flag, the status and navigation bars will be shown for a brief moment, before they get hidden by the OS again. They are actually overlayed in a translucent manner, your OpenGL surface doesn’t get resized (this is not true for the non-stick immersive mode). I let Roman Nurik explain it in more detail:
RenderScript via the NDK
From 4.4 onwards you can use RenderScript from within your C/C++ code directly. While this may not be directly game dev related, you may still want to look into it for some special use cases, i.e. image processing. It seems like the docs for this aren’t available yet (or the are hidden in a new NDK release, which i haven’t downloaded yet).
And that’s it. Android 4.4 seems to be a really solid release, adding a nice set of new features, even printing (by creating PDFs on the fly!).
Off to buy me a new Nexus 5!