Do you mean that in my Activity class there is a method
public static void ShowOrHideAds()
// my code
and call the method using JNI in native code (C++)?
Besides, has someone tried that if the below code in my activity.java is deleted, the adView will also appear automatically
// Admob view
mAdView = (AdView)this.findViewById(R.id.adView);