Thank you for the response. Here is a summary of my experience for the benefit of others.
Although in the end everything was already configured properly, it was impossible to tell for quite some time, and that lack of knowing led to considerable time wasted in experimentation. I found the following after having tested a sample ad successfully and after having set up an AdMob account correctly:
- For several hours, error code 0 (invalid server response) was returned by BannerAd_FailedToReceiveAd.
- Then, despite no change in code or AdMob account, for several hours error code 3 (no ad due to lack of inventory).
- Then, despite no change in code or AdMob account, for several hours ads were displayed but would not respond to touch.
- Then, despite no change in code or AdMob account, touching an ad resulted in a crash dump.
The crash dump gave a hint with a reference to "AdActivity" and following some searching I added the following to the Manifest Editor:
AddApplicationText(<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>)
Once this was done, the response to touching an ad was handled correctly and everything is good. So the bottom line is that most of the confusion comes from AdMob's delays in getting things flowing on their end, and their dashboard gives no indication of any problem, issue, or delay.
To summarize, the following lines are the total of what I added to Manifest Editor for AdMob. This information was gleaned from various threads of this forum. Only the first item is needed to successfully test a sample ad. The rest was needed to get real ads to work. This is only for banner ads - I haven't tried to tackle any other types yet.
AddReplacement($ADMOB_APP_ID$, ca-app-pub-xxxxxxxxxxxxxxxxxxxxxx~xxxxxxxxxx)
AddApplicationText(
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>)
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)