Google admob

150 views
Skip to first unread message

Amadi Promise

unread,
Jan 12, 2019, 3:36:58 PM1/12/19
to flutt...@googlegroups.com
I develop an app (flutter) and integrated Google AdMob to it, I run test banner and the ads displayed when I added my own AdMob id and test run the app again, I was unable to see ads, please I need your recommendations and suggestions...

Afa Mobius

unread,
Jan 12, 2019, 3:40:07 PM1/12/19
to Flutter Dev
You need to go to adsense and search for activating or approving you account , when you receive an email that it was approved , then give it sometime and it will show up soon , happened to me recently

Olaide Nojeem Ekeolere

unread,
Jan 12, 2019, 3:47:02 PM1/12/19
to Amadi Promise, flutt...@googlegroups.com
Hi Amanda,
Had the same issue till I provided my playstore app link in admob then it started fetching some hours after.

On Sat, 12 Jan 2019 at 9:36 PM, Amadi Promise <wiz...@gmail.com> wrote:
I develop an app (flutter) and integrated Google AdMob to it, I run test banner and the ads displayed when I added my own AdMob id and test run the app again, I was unable to see ads, please I need your recommendations and suggestions...

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Promise Amadi

unread,
Jan 13, 2019, 10:57:21 AM1/13/19
to Flutter Dev
Thanks for your replay, but my account has been approved since December 2018 until now ads are not showing on my app...

Olaide Nojeem Ekeolere

unread,
Jan 13, 2019, 11:00:50 AM1/13/19
to Promise Amadi, Flutter Dev
I am not talking about your account, i am talking about your app, has it gone live on the playstore, if so, copy the url and paste it in the settings for your app on admob, save and a few hours later it will start serving.

--

Promise Amadi

unread,
Jan 13, 2019, 11:05:16 AM1/13/19
to Flutter Dev
I have not published my app on play store, I want to see that all aspect of the app is working fine before publishing on play store but I will publish the app as you have advised...

EthicCoders Apps

unread,
Jan 13, 2019, 4:27:34 PM1/13/19
to Promise Amadi, Flutter Dev
It is not mandatory to publish your app on the Google Playstore to show up live ads. 

Below is my standard AdFirebase class that I use in all my flutter mobile apps, displaying Admob ads. 

import 'dart:io';

import 'package:dmr/utils/const.dart';
import 'package:firebase_admob/firebase_admob.dart';


class AdFirebase{

  static AdFirebase _adfirebase;
  final String admob_id = 'ca-app-pub-xxxxxxxxxx'; // Replace live android admob id
  final String admb_banner_id = 'ca-app-pub-xxxxxxxxxxxx';// Replace live android admob adunit id
final String ios_admob_id = 'ca-app-pub-xxxxxxxxxxxx';// Replace live iOS admob id
final String ios_admb_banner_id = 'ca-app-pub-xxxxxxxxxxxxx';// Replace iOS live admob adunit id
final String admob_test_banner_id = 'ca-app-pub-3940256099942544/6300978111'; AdFirebase(); static AdFirebase get instance { if(null==_adfirebase) { _adfirebase = new AdFirebase(); } return _adfirebase; } static BannerAd myBanner; bool _removeAdsValue = false; static final MobileAdTargetingInfo targetingInfo = new MobileAdTargetingInfo( testDevices: testDevice != null ? <String>[testDevice, testIOSSimulator] : null, keywords: <String>['foo', 'bar'], contentUrl: 'http://foo.com/bar.html', childDirected: true, ); void init() { print('isRemoveAds(): ' + isRemoveAds().toString()); if(!isRemoveAds()) { FirebaseAdMob.instance.initialize(appId: DEBUG ? FirebaseAdMob.testAppId : Platform.isIOS ? ios_admob_id : admob_id); _initAd(); } } void _initAd() { myBanner = new BannerAd( adUnitId: DEBUG ? admob_test_banner_id : (Platform.isIOS ? ios_admb_banner_id : admb_banner_id), targetingInfo: targetingInfo, size: AdSize.banner ); myBanner ..load(); // typically this happens well before the ad is shown } void showAd() { if(!isRemoveAds()) { myBanner..show(); } } setRemoveAdsValue(bool value) { _removeAdsValue = value; } void removeAds() { setRemoveAdsValue(true); myBanner?.dispose(); myBanner = null; } bool isRemoveAds() { return _removeAdsValue; } }


Then in const.dart file two entries...
const String testDevice = '7A99777F0A314417895182B0CE153EEF';
const String testIOSSimulator = 'kGADSimulatorID';
You can get the above values from your ad log entries in the ide. 

Then in your main or splash.dart 

// init firebase components
AdFirebase.instance.init();
// To start showing ads
AdFirebase.instance.showAd();

Andrew Brogdon

unread,
Jan 15, 2019, 12:17:57 PM1/15/19
to EthicCoders Apps, Promise Amadi, Flutter Dev
If the app is showing test ads correctly but failing to show ads when you use your own Ad Unit ID, it's likely something to do with your account or the particular Ad Unit ID you're trying to use, rather than anything in the plugin. You can check your device logs to see if there's any messages from the Android/iOS SDKs, and check the MobileAdEvent received by your app's MobileAdListener to get an idea of the problem.

I would also recommend making a post in the AdMob SDK support forum:


They have a team of dedicated AdMob support engineers who can check your ad unit configurations and do other things that the Flutter team isn't able to do.

-Andrew
Reply all
Reply to author
Forward
0 new messages