Posts tagged with android

I had banner, interstitial, and reward ads on one of my apps. The ads seemed to have been working for the past 2 months and then suddenly yesterday both android and iOS apps stopped showing ads:

iOS Error: code: 1, domain: com.google.admob, message: Request Error: No ad to show

Android: code: 3, domain: com.google.android.gms.ads, message: No ad config

It's also strange that both the apps have different error codes.

Package: google_mobile_ads: ^0.12.1+1

Code:

Container(      height: bannerAd.size.height.toDouble(),      child: AdWidget(             ad: bannerAd,             ),      margin: EdgeInsets.symmetric(vertical: 30), ) 

Note:

  1. The test ads seem to work just fine.
  2. The Android and iOS apps have been published on the stores and have been working just fine for the past 2 months.

I just make one App campaign from google adword.

having an issue regarding user came from ads campaign those having not set referrerUrl and wrong UTM params

I have used new install referrer client provided android library

everything working fine I got a custom UTM params from our website. but only issue that user came from Ad campaign

com.android.installreferrer:installreferrer:2.2 

my code as like below

I just set default organic if it return not set

I don't know what I have missing. but that particular flow not working

everything working fine with custom URL and a user came from directly PlayStore. the only problem that the user came from adcampaign

If I use Google Ads API with Java client library it throws the following exception:

io.grpc.ManagedChannelProvider$ProviderNotFoundException: No functional channel service provider found. Try adding a dependency on the grpc-okhttp, grpc-netty, or grpc-netty-shaded artifact     at io.grpc.ManagedChannelProvider.provider(ManagedChannelProvider.java:43)     at io.grpc.ManagedChannelBuilder.forAddress(ManagedChannelBuilder.java:39)     at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:325)     at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.access$1800(InstantiatingGrpcChannelProvider.java:81)     at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider$1.createSingleChannel(InstantiatingGrpcChannelProvider.java:231)     at com.google.api.gax.grpc.ChannelPool.create(ChannelPool.java:72)     at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:241)     at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:219)     at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:199)     at com.google.ads.googleads.v7.services.stub.GrpcGoogleAdsServiceStub.create(GrpcGoogleAdsServiceStub.java:97)     at com.google.ads.googleads.v7.services.stub.GoogleAdsServiceStubSettings.createStub(GoogleAdsServiceStubSettings.java:185)     at com.google.ads.googleads.v7.services.GoogleAdsServiceClient.<init>(GoogleAdsServiceClient.java:138)     at com.google.ads.googleads.v7.services.GoogleAdsServiceClient.create(GoogleAdsServiceClient.java:119)     at com.google.ads.googleads.lib.catalog.GeneratedCatalog$V7Client.createGoogleAdsServiceClient(GeneratedCatalog.java:4948) 

I'm not sure if it has something to do with how I use the client API. I use other Google APIs where some of them use GoogleSignInAccount, so I extract the access token from the signed in account:

Credentials credentials = OAuth2Credentials.newBuilder()         .setAccessToken(new AccessToken(                 GoogleAuthUtil.getToken(mContext,                         GoogleSignIn.getLastSignedInAccount(mContext).getAccount(),                         "oauth2:" + scope)),                 // Set expiration time in one hour, as credentials are created every time                 // this method is called.                 new Date(System.currentTimeMillis() + 60 * 60 * 1000))         .build(); GoogleAdsClient client = GoogleAdsClient.newBuilder()         .setCredentials(mAuthorizationService.getCredentials(SCOPE_ADWORDS))         .setDeveloperToken(mDeveloperToken)         .build(); String query = "SELECT metrics.cost_micros"         + "FROM campaign "         + "WHERE segments.date BETWEEN '" + getDate(start) + "' AND '" + getDate(end) + "' "; SearchGoogleAdsRequest request = createRequest(client, query); try (GoogleAdsServiceClient googleAdsService = createServiceClient(client)) {     GoogleAdsServiceClient.SearchPagedResponse response = googleAdsService.search(request); } 

The last line is where the exception is raised.

The install referrer library is installed in my application. Through it, I get where the user came from, respectively. I want to receive the static parameter utm_source = alexander if the user has installed the application by advertising launched in Google Ads UAC. I try to set the final url suffix at the account setup level - "referrer = utm_source% 3Dalexander". But I get "utm_source = (not set)" instead of the given parameter.

But if I go directly to the link "https://play.google.com/store/apps/details?id=...&referrer=utm_source%3DAlexander", then everything works as it should and in the statistics I see - "utm_source = Alexander ".

Can you please tell me how you can configure Google UAC correctly so that the static parameter specified in advance is passed to the application?

P.S. Auto-tagging is disabled at the account level in the settings

I'm working on converting my Kotlin App to Admob 20.1.0. Running into a problem integrating Rewarded Ads.

The problem is onUserEarnedReward is never called. I currently have no way of rewarding the user with the content they unlocked. My code below is placed in an onClickListener within an AppCompatActivity()

if (mRewardedAd != null) {     mRewardedAd?.show(this, OnUserEarnedRewardListener { // Redundant SAM-constructor         fun onUserEarnedReward(rewardItem: RewardItem) { // Function "onUserEarnedReward" is never used                          val rewardAmount = rewardItem.amount             val rewardType = rewardItem.type             println("======================= TYPE -  $rewardType /// AMOUNT - $rewardAmount")             // This never gets called.         }     }) } else {     println("=======================The rewarded ad wasn't ready yet.") } 

My imports:

import com.google.android.gms.ads.* import com.google.android.gms.ads.rewarded.RewardItem import com.google.android.gms.ads.rewarded.RewardedAd import com.google.android.gms.ads.rewarded.RewardedAdLoadCallback import com.google.android.gms.ads.OnUserEarnedRewardListener 

Why am I getting Redundant SAM-constructor and Function "onUserEarnedReward" is never used ?