- Home /
Admob ads not shown
any help will be appreciated
I finished my first android game 3 days ago && I want to put ads before publishing it
up till now , I did not manage to integrate AdMob ads in my game
according to unity console : the ads created , requested , loaded and shown successfully
but never shown in my android device
maybe AdMob blocked my account from receiving ads as I tested the ads too much(just impressions no clicks)
I can`t publish my game up till now , so any help will be appreciated !!
using UnityEngine;
using Google$$anonymous$$obileAds.Api;
public class ads : $$anonymous$$onoBehaviour
{
bool called = false;
void Start()
{
if (Application.loadedLevelName == "gameplay")
{
interesRequest(called);
}
if (Application.loadedLevelName == "main$$anonymous$$enu")
{
bannerRequest();
}
if (Application.loadedLevelName == "levelScore")
{
}
}
void bannerRequest()
{
BannerView bannerView = new BannerView("ca-app-pub-5443208681329246/6087569010", AdSize.Banner, AdPosition.Bottom);
AdRequest request = new AdRequest.Builder().Build();
bannerView.LoadAd(request);
bannerView.Show();
}
void interesRequest(bool call)
{
InterstitialAd inters = new InterstitialAd("ca-app-pub-5443208681329246/7564302219");
if (call)
{
if (inters.IsLoaded())
{
inters.Show();
called = false;
}
}
else
{
AdRequest request = new AdRequest.Builder().Build();
inters.LoadAd(request);
}
}
void Update()
{
if (called)
interesRequest(called);
}
public void On$$anonymous$$ouseDown()
{
if (gameObject.name == "pause")
{
if (menu.bug)
{
called = true;
}
}
}
}
I tested my adUnits in working codes 100%
but also not shown it ..
so , maybe Ad$$anonymous$$ob blocked my account from receiving ads as I tested the ads too much(just impressions no clicks)
It is better you show the code you are using when calling the ad. Also check if your Android $$anonymous$$anifest has internet permission.... Also, don't forget to tick testing in the Admob console.
Are you using Unity Remote or are you installing the app on Bluestacks? From what I recall, Unity apps don't work on Bluestacks. Let me repeat, you will not see any ads if you are testing via Unity Remote.
For more information regarding logcate usage, check: http://developer.android.com/tools/help/logcat.html
If you have Eclipse/Android Studio already installed, you can just fire those up and see the logs in logcat view.
Answer by baji321 · May 25, 2017 at 07:10 AM
Same issue here bro I added the failure callback and displayed the error message, i got internal error ... :(
Answer by wuym67123 · Jul 15, 2017 at 02:54 AM
This may help https://github.com/unity-plugins/Unity-Admob
Your answer
Follow this Question
Related Questions
Buttons don't work with AdMob 1 Answer
Admob iOS Rewarded Videos don't close 0 Answers
Banner Ads which contain animated ads affect the performance of the game !! 2 Answers
Admob interstitial ads works, but rewarded video doesn't work 0 Answers
The ads on my game runs when I run it on development build but not in release build. 1 Answer