- Home /
Admob interstitial showing using listener
At present I can able to show interstitial ads of AdMob. I have used following code for this.
if (GUI.Button(new Rect(10, 300, 150, 50), "Load Interstitials"))
{
interstitial.LoadAd(interstitialsRequest);
}
if (GUI.Button(new Rect(10, 400, 150, 50), "Show Interstitials"))
{
if (interstitial.IsLoaded())
{
interstitial.Show();
}
}
In this I want to attach listener for interstitial loading is complete. For this I have view all available source files but can't able to figure out right listener method.
void onAdLoaded()
{
print("Interstitial Ad Loaded");
}
public void HandleAdLoaded(object sender)
{
print("HandleAdLoaded event received.");
// Handle the ad loaded event.
}
I have used googleads-mobile-plugins for admob ads
At present ads are working perfectly but want to detect interstitial loading through listener.
Please help me in this and thanks for your time.
Answer by HarshadK · Aug 06, 2014 at 01:36 PM
Something like this:
UnityAdListener listener;
listener.OnAddLoaded = HandleAdLoaded;
public void HandleAdLoaded(object sender)
{
print("HandleAdLoaded event received.");
// Handle the ad loaded event.
}
Haven't tested it so better check it out.
In that I can't able to found UnityAdListener. So which listener I have to use that I don't know!!!
Your answer
Follow this Question
Related Questions
Unity build with admob giving "r8 debrecated" errors 1 Answer
AdMob - Cannot move Ad around the screen... 1 Answer
How do Smart Banners scale? 0 Answers
iAds fallback to admob 0 Answers
A node in a childnode? 1 Answer