In Unity Editor there are blue screen in place where my ad should be: “Here would be your Ad unit (things seems to be working”.
What I did:
added code related to ad to my scripts (with the same app ID as in Unity Ad service),
entered link to GooglePlay app page in Unity Ad Service,
forced test mode OFF.
But if I install APK on a device - there are no ad screen (both with debugging mode and with signed APK).
In Unity Ad Service: I checked my app ID, entered link to google play page with my game. Did I miss something, some step (should I do something on AdMob site, or interact with some advertiser) ?
See screenshots with Ad Service settings below.
That’s my code related with ad:
Sorry for delay. Works without problems here on my Android device, when using your example code.
Have you tried without the use of Coroutines in this case? If the ad isn’t ready for whatever reason (connectivity, ads disabled on device etc), you would end up in a situation where you just loop forever, or have the Ad shown on some random time later on.
In this case I would suggest that you just use a normal non-coroutine method, and in case ad isn’t available just ignore it. Makes sense?
I use latest versions. In player settings, install location: I selected auto (I think that’s why it asks this permission), do you want me to change it (or how about I’ll sent you development build apk) ?
Something is not correct here. Can you report a bug using the “Help → Report a bug” menu item from Unity with your project attached and post the bug id here (not the full url)?
Seems you are trying to show ad immediately after Advertisement.Initialize() call? Could you try something like the following, to see if ads is being shown?
And use of Update() here is only for the example purpose, you should put this logic somewhere else.
using UnityEngine;
using UnityEngine.Advertisements;
public class NewBehaviourScript : MonoBehaviour
{
bool adsHasBeenShown = false;
void Start ()
{
Advertisement.Initialize ("<gameid>", true);
}
void Update()
{
if (!adsHasBeenShown && Advertisement.IsReady ())
{
adsHasBeenShown = true;
Advertisement.Show ();
}
}
}
Now ad works in editor after I put .Show() in button’s method. But on a real device still no ad screen. Used development build.
May be I missing something, as I understand I should do these steps (for testing):
create new ad in my page on Unity Ad Service;
put Initialize() and Show() in some script with ad ID from Ad Service;
I have the same issue: Ads working on iOS, but not on Android.
On iOS, the ads work perfectly and tested on 3 devices.
The same project on Android with test mode enabled works in the editor and on the device.
But no ads are showing on any Android devices tested to when testmode is disabled.