Book Image

Building Android Games with Cocos2d-x

By : Raydelto Hernandez
Book Image

Building Android Games with Cocos2d-x

By: Raydelto Hernandez

Overview of this book

Table of Contents (16 chapters)
Building Android Games with Cocos2d-x
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding ads to the game by inserting Java code


In the previous section, we have created an interaction between our C++ game logic code and the Java layer of our Android app by using JNI. In this section, we are going to modify our Android-specific code in order to show the Google AdMob banners in our Android game.

Note

AdMob is a Google platform that allows you to monetize your app by displaying ads, it also has analytics tools, and tools for in-app purchases.