-
-
Notifications
You must be signed in to change notification settings - Fork 58
Platform setup
- Android
- iOS
AdMOB only supports ads on mobile. Web and desktop are out of reach
Add your ADMOB App ID (How to find it?) in AndroidManifest.xml
. Learn more
<manifest>
<application>
<!-- Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy">
</application>
</manifest>
Key Point: In a real app, it is important that you use your actual AdMob app ID
, not the one listed above. If you're just looking to experiment with the SDK in a Hello World app, though, you can use the sample app ID shown above.
Important: This step is required. Failure to add this <meta-data>
tag results in a crash with the message: The Google Mobile Ads SDK was initialized incorrectly
.
If you'll use NativeAds
, change minSdkVersion
to 19
or higher. It's the minimum sdk version required by flutter to use a PlatformView. Learn more
android {
defaultConfig {
minSdkVersion 19
}
}
If you won't, change it to 16
or higher.
android {
defaultConfig {
minSdkVersion 16
}
}
iOS is currently not supported (I don't have an Apple environment :/). Feel free to create a pull request with the implementation for it :)
Next: Initialize |
---|