MobileAds.initialize(Context, String) is deprecated
Initialize MobileAds with the following instead:
MobileAds.initialize(this, initializationStatus -> { });
Get started with AdMob in your Android project seems to answer the application ID part:
Add your AdMob App ID to your app's
AndroidManifest.xml
file by adding the<meta-data>
tag as shown below.Important: This step is required as of Google Mobile Ads SDK v17.0.0. If you don't add this
<meta-data>
tag, your app will crash with the message: "The Google Mobile Ads SDK was initialized incorrectly.
"
<manifest>
<application>
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ADMOB_APP_ID"/>
</application>
</manifest>
And the publisher ID still is required for Requesting Consent from European Users.