Cocos2d-x Activity Java code

Hi,
I’m using Cocos2d-x 2.2.x version, what is best practice for adding some additional native java functionality like Admob banner.

Should I add it to Cocos2dxActivity.java in Cocos2d-x or in project main class which is extended from Cocos2dxActivity. Is there any difference in where I will add new code?

u can refer to here.

Main class in project us extended from Cocos2dxActivity, so it’s nothing different. But Add new code to child class is a good habit, and it is convenience to upgrade Cocos2d-x engine.