I have been trying for like a month now to properly implement Google Play Services and Google Mobile Ads into my Unity Android Game. I have had success in getting Google Play Services to work but when I added Google Mobile Ads at first it didn't work. I just didn't see any ads pop up. Now when I build my app it won't open it just crashes. Not exactly sure what I did. I have configured all the services correctly according to my knowledge and I'm am just using code from the documentation for the ads. Heres that code:
public static AdManager Instance { set; get; }
public string bannerId;
public string videoId;
public string deviceId;
BannerView bannerView;
InterstitialAd interstitial;
private void Start ()
{
Instance = this;
DontDestroyOnLoad(gameObject);
interstitial = new InterstitialAd(videoId);
AdRequest request = new AdRequest.Builder().AddTestDevice(deviceId).Build();
// Load the banner with the request.
interstitial.LoadAd(request);
}
public void ShowInterstitial()
{
if (interstitial.IsLoaded())
interstitial.Show();
}
I am using the correct ad Ids, I double checked that. I don't know what else to do. I can provide any other information you may need upon request.
Anyone with experience with this would be super helpful! Thanks!