O'Reilly logo

Advanced Android 4 Games by Vladimir Silva

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

Chapter 2

Gaming Tricks for Phones or Tablets

This chapter contains a lot of goodies to get your feet wet with native development in Android.

We begin by showing you how easy it is to build a simple Android app that loads a native library and executes methods written in C within Java. But it also shows how you can call back Java methods within C, so the communication goes both ways between the languages.

Next we look at how we can cascade Audio, Video, Key, and Touch events from Java to C by using thin Java wrappers that simply pass event information to the native library.

And then we tackle multitouch, which is a useful subject for advanced games such as shooters and others. Multitouch can be a tricky subject so check it out.

Finally we end ...

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