Working through book Android NDK Beginner's guide Chapter 4