#StackBounty: #ios #admob AdMob on iOS – No ad to show

Bounty: 50

I have had AdMob working fine with test ads for the last 6 months on a new iOS game. Now I want to release it, I switch to using the live AdUnitIds that I have setup in Admob, but it fails on all iOS devices with this error:

Request Error: 1 No ad to show.

Occurring here:

public override void DidFailToReceiveAd(Interstitial sender, RequestError error)
{
    System.Diagnostics.Debug.WriteLine(“DidFailToReceiveAd  error={0}", error);
}

I am using banner and interstitial ads and get the same error for both.

I have two other games with AdMob all working fine.

Some observations and thoughts:

  1. Interestingly, if I change the BundleID of my new game to one of my other games, the live ads work fine (ie using the exact same code and the new AdUnitIDs), so it can’t be problem with my code or the AdUnitIDs. For some reason it doesn’t like my games BundleID.

  2. Is it because the new game is not live in the App Store yet (it’s Pending Developer Release)? I don’t think so as live ads certainly used to work before release.

  3. My new app is not “linked” to AdMob (you can’t link it until it’s Live), so is it related to that? Again I don’t think so as Linking didn’t used to make any difference (with my two other games over the last two years)

  4. I can see in my AdMob account there are hundreds of "Requests" but no "Impressions" (apart from the handful I got when I changed the BundleID to my other game as I mentioned above).

So I am stuck waiting to release this new game. Maybe releasing it will start the Ads working? But if not, my game will be shooting up the charts while I don’t get any revenue!

Has someone else had the same problem and then maybe it started working by itself after 7 days or 30 days? Or if they had to create a totally new app with different BundleId or if they gave up and used a different ad supplier?

(Also it seems impossible to contact AdMob support, there’s no email or phone and I have tried posting on their support forum, but no joy, so I am really stuck! Does anyone know any way to contact AdMob support?)


Get this bounty!!!

#StackBounty: #android #admob #adsense #user-experience #google-ads Is it forbidden or illegal to show "you should open internet c…

Bounty: 50

When user don’t have an internet connection i want to show a black fullscreen popup that include like

"you should open your internet to use this app"

or

"no internet connection found please open it"

every minutes for show my google ads;
and popup will countdown from 5 second for close the popup.

And i don’t want to be banned from google ads because of illegal behaviours.

Is it forbidden or illegal with google ads policy, i didn’t see any information about this on google ads docs?


Get this bounty!!!

#StackBounty: #flutter #dart #admob #observable BannerAd.dispose Not Working Flutter Admob

Bounty: 50

I’m currently trying to display an admob banner in my app, However there are two pages where I would not like the banner displayed (For now i’m testing with just the settings route), And calling dispose on the banner does not hide it.

What I tried:

  1. Creating the banner for each widget and calling the dispose method inside the override of the widget’s onDispose method
  2. Creating an Ad manager class that created the banner and saved a reference to it, and invoking a function from said class that calls dispose on the banner inside the init of the page I don’t want the banner shown on.
  3. My current solution: an observer class that shows the banner on push, and if the name of the route matches what I’m looking for hides the banner.

So far none of these approaches have been successful 🙁 What am I doing wrong? Am I missing something?

Observer class:

class AdmobObserver extends RouteObserver<PageRoute<dynamic>> {

  static ValueNotifier<bool> isBannerAdShowing = ValueNotifier<bool>(false);

  BannerAd _myBanner = BannerAd(
    adUnitId: AdManager.bannerAdUnitId,
    size: AdSize.banner,
    listener: (MobileAdEvent event) {
      if (event == MobileAdEvent.loaded) {
        isBannerAdShowing.value = true;
      }
      else if (event == MobileAdEvent.failedToLoad) {
        isBannerAdShowing.value = false;
      }
    },
  );

  @override
  void didPush(Route route, Route previousRoute) {
    super.didPush(route, previousRoute);
    if (route.settings.name != '/settings') {
      _showBannerAd();
    } else {
      _myBanner.dispose();
      isBannerAdShowing.value = false;
    }

  }

  @override
  void didPop(Route route, Route previousRoute) {
    super.didPop(route, previousRoute);
    _showBannerAd();
  }

  void _showBannerAd() {
    _myBanner
      ..load()
      ..show();
  }
}

Main App:

class MyApp extends StatelessWidget {

  static AdmobObserver admobObserver = AdmobObserver();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'MyApp',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        fontFamily: 'Montserrat',
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      navigatorObservers: <NavigatorObserver>[admobObserver],
      initialRoute: '/',
      onGenerateRoute: RouteGenerator.generateRoute,
    );
  }
}

EDIT:
it seems as if the Routes passed to the didPush method in my observer are null, So here are the logs and my route generator:

log(route):

 MaterialPageRoute<dynamic>(RouteSettings("null", null), animation: AnimationController#bc4fa(▶ 0.000; for MaterialPageRoute<dynamic>(null)))

RouteGenerator:

class RouteGenerator{
  static Route<dynamic> generateRoute(RouteSettings settings){
    final args = settings.arguments;

    switch(settings.name){
      case '/':
        Map<String,dynamic> argus = args;
        if(argus == null || argus['message'] == null)
          return MaterialPageRoute(builder: (_) => MyHomePage());
        return MaterialPageRoute(builder: (_) => MyHomePage(message:argus['message']));
      case '/settings':
        if(args is bool){
          return MaterialPageRoute(builder: (_) => Settings(perms: args,));
        }
        return _errorRoute();
  }
  static Route<dynamic> _errorRoute({String message = "Unexpected Arguments"}){
    return MaterialPageRoute(builder: (_) => ErrorPage(message));
  }
}

Example of pushing the next page:

 final u = await Auth().getCurrentUser();
 final arg = u != null;
 Navigator.pushNamed(context, '/settings', arguments: arg);


Get this bounty!!!

#StackBounty: #android #admob Weird exception only in 1 user

Bounty: 50

I’ve an android app curently in production installed in over 30k devices and used by 3500 people per day. 1 single user is getting this exception repeatedly

WeakHashMap.java line 806

Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.SCREEN_OFF flg=0x50200010 (has extras) } in com.google.android.gms.ads.internal.util.bw@98afaa4
       at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52226(LoadedApk.java:1329)
       at android.app.-$Lambda$FilBqgnXJrN9Mgyks1XHeAxzSTk.$m$0(-.java:4)
       at android.app.-$Lambda$FilBqgnXJrN9Mgyks1XHeAxzSTk.run(-.java)
       at android.os.Handler.handleCallback(Handler.java:789)
       at android.os.Handler.dispatchMessage(Handler.java:98)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6942)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

this is nothing related to my code for sure as it specifies the google.ads package

100% of the crashes come from:

Device
Brand: samsung
Model: SM-G570M
Orientation: Portrait
RAM free: 308.34 MB
Disk free: 12.12 GB
Operating System
Version: 8.0.0
Orientation: Portrait
Rooted: No

90% of the time the device app is in background

It happens in some googles api code so i cant catch it… does anyone have any idea of the cause? how can i solve


Get this bounty!!!

#StackBounty: #android #unity3d #crash #admob #android-9.0-pie Android 9 Pie crash (com.google.android.gms… ClassNotFoundException)

Bounty: 150

I have a Unity3D game published on Android, and it have worked well so far.
However, the Android Vitals Dashboard is now reporting a lot of crashes. Here’s the detailed info:

By Android version: Android 9   4500    100.0%

Stacktrace:

java.lang.Error: FATAL EXCEPTION [Thread-360]
Unity version     : 2017.3.1p3
Device model      : Google Pixel
Device fingerprint: google/sailfish/sailfish:9/PQ2A.190305.002/5240760:user/release-keys
Caused by
  at lt.b (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2)
  at ls.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
  at lu.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:18)
  at com.google.android.gms.ads.internal.util.ar.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:10)
  at kx.a (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:7)
  at kx.run (com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
  at ac.loadClass (com.google.android.gms.dynamite_dynamiteloader@16089081@16.0.89 (100400-239467275):4)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)

My AndroidResolverDependencies.xml file:

<dependencies>
  <packages>
    <package>com.android.support:customtabs:[26.0.0, 27.2.0[</package>
    <package>com.android.support:support-v4:[26.0.0, 27.2.0[</package>
    <package>com.google.android.gms:play-services-ads:17.2.0</package>
    <package>com.google.android.gms:play-services-analytics:11.8.0</package>
    <package>com.google.android.gms:play-services-base:[10.2.1, 12.1.0[</package>
    <package>com.google.android.gms:play-services-location:[10.2.1, 12.1.0[</package>
    <package>com.google.firebase:firebase-messaging:[10.2.1, 12.1.0[</package>
  </packages>
  <files>
    <file>Assets/Plugins/Android/android.arch.core.common-1.1.0.jar</file>
    <file>Assets/Plugins/Android/android.arch.core.runtime-1.1.0.aar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.common-1.1.0.jar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.livedata-core-1.1.0.aar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.runtime-1.1.0.aar</file>
    <file>Assets/Plugins/Android/android.arch.lifecycle.viewmodel-1.1.0.aar</file>
    <file>Assets/Plugins/Android/com.android.support.customtabs-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-annotations-27.1.1.jar</file>
    <file>Assets/Plugins/Android/com.android.support.support-compat-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-core-ui-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-core-utils-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-fragment-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-media-compat-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.android.support.support-v4-27.1.1.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-base-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-identifier-16.0.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-ads-lite-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-analytics-16.0.8.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-analytics-impl-16.0.8.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-base-16.1.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-basement-16.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-gass-17.2.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-location-16.0.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-base-16.3.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-measurement-sdk-api-16.3.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-places-placereport-16.0.0.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-stats-16.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-tagmanager-v4-impl-16.0.8.aar</file>
    <file>Assets/Plugins/Android/com.google.android.gms.play-services-tasks-16.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.auto.value.auto-value-annotations-1.6.jar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-common-16.1.0.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-iid-17.1.2.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-iid-interop-16.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-measurement-connector-17.0.1.aar</file>
    <file>Assets/Plugins/Android/com.google.firebase.firebase-messaging-17.6.0.aar</file>
  </files>
</dependencies>
Target API level: 28
Minimum API level: 16

I’ve seen a similar thread in Google AdMob’s discussion group suggesting to add the following to the AndroidManifest.xml file:

<uses-library android:name="org.apache.http.legacy" android:required="false" />

However:

  1. I’m not sure the problem is caused by any apache-related API.
  2. I’m afraid this will restrict the number of installs in my app since it will be available to a smaller audience in Google Play due to the uses-library declaration.


Get this bounty!!!

#StackBounty: #android #admob Admob ad page views much higher than impressions on tablets

Bounty: 50

I have recently published an app to the Play Store with Admob ads. I noticed something odd today as my page views reported by AdSense were much higher than my impressions (7400 page views vs 1500 impressions). My match rate is still high (90%+) which suggests to me the ad requests are being fulfilled but the ads are not being displayed to the user. I then checked the platform information on AdSense to find that nearly all page views on ‘high end mobile devices’ lead to an impression (1800 page views to 1500 impressions) whereas on ‘tablets’ I have 5600 page views to 13 impressions. This suggests to me that the ads are being displayed fine on mobile phones but barely at all on tablets.

What could be causing this? Are there any additional steps that must be taken to ensure admob ads are displayed on tablets as well?

Note: most of my ads appear as interstitials, and some banner ads.


Get this bounty!!!