O'Reilly logo

Android NDK Beginner's Guide by Sylvain Ratabouil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we created our first fully native application without a line of Java code and started to implement the skeleton of an event loop which processes events. More specifically, we have seen how to poll events accordingly and make an application alive. We have also handled events occurring during activity lifecycle to activate and deactivate activity as soon as it is idling.

We have locked and unlocked natively the display window to display raw graphics. We can now draw graphics directly without a temporary back buffer. Finally, we have retrieved time to make the application adapt to device speed, thanks to a monotonic clock.

The basic framework initiated here will form the base of the 2D/3D game that we will develop throughout ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required