Android Question Rewarded Interstitial Ads (Help / guidance Please)

chris ash

Member
Licensed User
Longtime User
Hi guys

I am looking at implementing some rewarded adverts into one of my new Android apps, and I have to say with Admob, and Mediation, and SDK's and GDPR I am just totally confused by it all at present.

So I am currently using the Firebase Admob setup, i've updated it to ask the question when people first use the app. All is well there. I have managed to set it up for interstitial adverts also.

However, Rewarded adverts I have never had any success with. I have tried the inMobi mediation in the past and I have tried again now. Again its still not working.

I guess what I am asking at this point is this still the correct way to implement rewarded ads into an Android app? Or can Admob just do it without the mediation? as they have the option in the ad unit setup pages.

Either way how would I then go about implementing it into my app? If anyone has any handy advice or code snippets to get me up and running I'd be very appreciative.

Kind regards
CAsh
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can now show rewarded ads without mediation.

1. Update to FirebaseAdmob v1.51: https://www.b4x.com/android/forum/threads/updates-to-internal-libraries.59340/#post-592335

2. Initialize and load a test ad:
B4X:
rewardAd.Initialize("rewardAd")
   rewardAd.LoadAd("ca-app-pub-3940256099942544/5224354917")

Events:
B4X:
Private Sub RewardAd_Rewarded (Item As Object)
   Log("Rewarded!")
End Sub

Private Sub RewardAd_ReceiveAd
   Log("receive reward ad")
   rewardAd.Show
End Sub

Private Sub RewardAd_FailedToReceiveAd (ErrorCode As String)
   Log("RewardAd_FailedToReceiveAd: " & ErrorCode)
End Sub
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
Chris,

there can be a lot of reasons why it doesn't work.

first of all when you enable it in admob it can take up to a day before it will actually work.

is mediation correctly set up on both sides?

maybe there's no rewarded videos for you (mainly your country) at that time?

good thing is that admob also spits out rewarded videos for a while now.

side node about inmobi...

I think they're mainly India only and I don't think their mediation is still working when I look at rewarded video stat in my console (see below).
That the impressions are so low is normal since it preloads before it enables the rewarded ad button and not everyone uses the button to get a hint in a game.
But 0 impressions on 2629 request is kind of suspecious ;)
(I'll remove them again on next updates)


inmobi.png
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
it's not in the screenshot but the fill rate is 3 times 0% for inmobi so there's nothing to show anyway.
 
Upvote 0

chris ash

Member
Licensed User
Longtime User
Thank you Erel for the code. And thank you again Sorex for the advice.

As I suspect you were leading onto Sorex I have now implemented Erel's code. If I use the test ad ID I get Gary or whatever his name is from Admob telling me this is a rewarded ad and all works well. However when I drop my Ad ID into it I get failed, failed, failed and failed.

I have tried It on a couple of devices, I have asked a friend to try it and still the same issue. Always fails.

I have removed a recreated by Ad unit on Admob (No mediation). I have updated the JSON file from Firebase and I have given it over night since unit creation. Now I still get nothing but Failed, and it is indeed code 3. At this stage is that everything I can do on the subject is it enough to say that I saw the test ad so everything is ok? Or is there something else I am missing with regards getting my adverts working?

As a side not to this I also have an issue at present that I seem to be getting stupidly large numbers of Failed 3's on Banner ads too. Seems to be more on Smart Banners. Standard banners seem fine but then take up too much of the screen. This is a side note at this point as that is another massive question.

As you can probably tell I'm quite frustrated with ads at the moment. Any advice you guys can offer would be gratefully received.

Thanks
CAsh
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
are you sure that you're using the right id? not a trailing space or something in it?

error 3 makes sense in the first hours as it takes time for the ad unit to go live.

can you show some code or isolate only the rewarded video in an example file?
 
Upvote 0

chris ash

Member
Licensed User
Longtime User
Hello again

Once again thanks for getting back to me.

So please find attached this is the code lifted from my project. I have my Ad ID ending 384 in there. Along with the Google test one above it. Use the Google one and its game on. Use mine and its no, no and no. I keep wondering if I have some code wrong somewhere but if I get the test ad can that even be the case?

Could it be something like you're the owner of the account so we don't fire you an ad to you? (Although my mate didn't get one either) Or the fact the app is not yet in the app store? I just don't know why it won't play ball?

Any thoughts or advice much appreciated

Kind regards
CAsh
 

Attachments

  • Rewarded Test.zip
    10.1 KB · Views: 233
Upvote 0

sorex

Expert
Licensed User
Longtime User
Could it be something like you're the owner of the account so we don't fire you an ad to you?

nope, then you wouldn't see the banners and interstitials either.

I'll check it out in a few minutes when my phone has been charged a little.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
good news, the admob part seems fine as I can show rewarded video ads with your id in one of my apps.

I'll have a look at why it doesn't work in your initial app.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
interesting...

the only way to get your code working is by tweaking the package name to one of my existing ones.

maybe they logged package names before that GDPR stuff started and are you now forced to use that consent first to make this working?

Are you in europe?
 
Upvote 0

chris ash

Member
Licensed User
Longtime User
Hello Again

Thank you for your time on this. This is a really weird issue?

In answer to your question I am UK based

So just to clarify are you saying if you put my code with my Ad ID? into one of your apps then you get the advert? Or do you have to change the ad ID back to one of yours?
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
yes.

your ad id my app > works
your ad id in your app with package name change to one of my published apps > works


your ad id in your app with original package name or a new one by me > fails
my ad id in your app with original package name or a new one by me > fails


maybe they only allow published app package id to retrieve these to prevent cheating?
 
Upvote 0

chris ash

Member
Licensed User
Longtime User
Hello again

Yes, that is certainly what the logic seems to be pointing to.

I tell you I will bother you no more at this point as the code and my ID seem to be fine. I will put my app out there and see what happens.

Again I thankyou for your time, and I will let you know what happens.

Kind regards
CAsh
 
Upvote 0
Top