I am making demo app in cocos2d-x where I am trying to integrate admob ads in that. I am adding it in to the game_demo.xml layout where cocos2dx GLSurfaceview is getting added. It works proper throughout the cocos2d-x scenes. But now If I want that view to visible only in specific scenes how to go about it ? I know JNI comes in to the picture but I do not know how will I use those JNI calls for making View invisible or Gone as we do it in normal android way.
I guess you have to go through jni create a static method in cocos2dxActiity.java called
setDisplayAd(bool value){
//your java code goes here.
//disable or enable the ad activity here
}
than you need to call this Java method in your cocod2d-x code (in the scene you want)