Finally, this is the post I was looking for all week, almost wasted more than 2 days to find the difference between Ad AppID, AdUnitID, and where to put them appropriately.
Major Differences:
ca-app-pub-3940256099942544~3347511713 <- Test AppID (has Tilde ~)
ca-app-pub-3940256099942544/6300978111 <- Test AdUnitID (has forward slash /)
AppID -> Manifest tag, MobileSdk Initialization.
Found in AdmobPage->App->AppSettings->AppID
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="AppID Here"/>
and
MobileAds.initialize(this, "AppID Here");
AdUnitID (Banner/Small/Interstitial., etc)
Found in AdmobPage->AdUnits and appropriate Ad units like banner etc.
AdView instances can be inflated from XML having (AdUnitID set from above step) or dynamically set at runtime using mAdView.setAdUnitID("your AdUnitID here")
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
app:adSize="BANNER"
app:adUnitId="ca-app-pub-3940256099942544/6300978111"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.494"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:layout_constraintVertical_bias="0.892">
</com.google.android.gms.ads.AdView>
Though its 2019, this post is still very helpful,
Thanks.