Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by babji3 · Jun 01, 2015 at 01:06 PM · androidadmobscritpingbanner

Google Mobile Ads Interstitial ads is not showing in unity

hi,am downloaded the Google Mobile Ads plugin from their website ,I follow the steps what they have,Banner Ads is Showing but Interstitial Ads is not,Here is my code..

 using UnityEngine;
 using System.Collections;
 using System.Collections.Generic;
 using GoogleMobileAds.Api;
 using GoogleMobileAds;
 
 public class AdsShowTest : MonoBehaviour {
 
 
     private BannerView bannerView;
     private InterstitialAd interstitial;
 
 
 
     void Start () 
     {
         DontDestroyOnLoad(this);
         RequestBanner ();
         RequestInterstitial ();
 
 
     }
     public void RequestBanner()
     {
         #if UNITY_ANDROID
         string adUnitId = "ca-app-pub-3940256099942544/6300978111";
         #elif UNITY_IPHONE
         string adUnitId = "INSERT_IOS_BANNER_AD_UNIT_ID_HERE";
         #else
         string adUnitId = "unexpected_platform";
         #endif
 
         // Create a 320x50 banner at the top of the screen.
         BannerView bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Top);
         // Create an empty ad request.
         AdRequest request = new AdRequest.Builder().Build();
         // Load the banner with the request.
         bannerView.LoadAd(request);
         //bannerView.Show();
     }
 
     private void RequestInterstitial()
     {
         #if UNITY_ANDROID
         string adUnitId = "ca-app-pub-3940256099942544/1033173712";
         #elif UNITY_IPHONE
         string adUnitId = "INSERT_IOS_INTERSTITIAL_AD_UNIT_ID_HERE";
         #else
         string adUnitId = "unexpected_platform";
         #endif
         
         // Initialize an InterstitialAd.
         InterstitialAd interstitial = new InterstitialAd(adUnitId);
         // Create an empty ad request.
         AdRequest request = new AdRequest.Builder().Build();
         // Load the interstitial with the request.
         interstitial.LoadAd(request);
         print("Ad is Loaded");
 
         if (interstitial.IsLoaded()) 
         {
             interstitial.Show();
             print("Ad is Showing");
         }
     }
     
 
 
     void Update ()
     {
 
 
 
         if(Input.GetKeyDown(KeyCode.Escape))
            Application.Quit();
 
     }
 
 }

i Modify the Ad Manifest also, Please tell me what am doing wrong.Thanks

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image babji3 · Jun 02, 2015 at 04:26 AM 0
Share

Am using Android Platform,Here i add the line what u say ,but this one also not working,here is my Xml code

 <?xml version="1.0" encoding="utf-8"?>
 <!--
 
 This Google $$anonymous$$obile Ads plugin library manifest will get merged with your
 application's manifest, adding the necessary activity and permissions
 required for displaying ads.
 
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.google.unity"
     android:versionName="1.0"
     android:versionCode="1">
   <uses-sdk android:$$anonymous$$SdkVersion="9"
       android:targetSdkVersion="19" />
   <!-- Google $$anonymous$$obile Ads Permissions -->
   <uses-permission android:name="android.permission.INTERNET"/>
   <uses-permission android:name="android.permission.ACCESS_NETWOR$$anonymous$$_STATE"/>
   <application>
   
     <!-- Denote the referenced Google Play services version -->
     <meta-data android:name="com.google.android.gms.version"
         android:value="@integer/google_play_services_version" />
         <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true"/>
     <!-- Google $$anonymous$$obile Ads Activity -->
     <activity android:name="com.google.android.gms.ads.AdActivity"
         android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|ui$$anonymous$$ode|screenSize|smallestScreenSize"/>
   </application>
 </manifest>
avatar image babji3 · Oct 14, 2015 at 09:47 AM 0
Share

No, i didnt used this plugin, bcoz it shows tags, you have to buy this to remove that tag"message tag",

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by sillanstudios · Jun 01, 2015 at 04:19 PM

What platform are you developing for? Android? Maybe check the Androidmanifest.xml and make sure ForwardNativeEventsToDalvik is set to true.

 <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image babji3 · Jun 02, 2015 at 06:57 AM 0
Share

Ok am given up for this and am using this free plugin..it works fine for me,

link text

avatar image Karios babji3 · Oct 13, 2015 at 10:04 AM 0
Share

Whats the Name of this free Plugin and where can i find it

avatar image bigjobs Karios · Feb 28, 2016 at 02:36 PM 0
Share

https://github.com/unity-plugins/Unity-Admob

avatar image babji3 · Oct 13, 2015 at 02:26 PM 0
Share

google it its free,

avatar image Munchy2007 · Oct 13, 2015 at 02:37 PM 0
Share

@$$anonymous$$arios In case you missed it there is a link in babji3's comment to the free addon, http://forum.unity3d.com/threads/admob-unity-plug-in-use-google-play-services-support-interstitial.236156/

By all accounts this is quite a good package, however I haven't used it myself.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Admob Banner is not clickable. 0 Answers

Can't set ForwardNativeEventsToDalvik to true? 1 Answer

Why does my AdMob banner not appear on my Samsung TabA? 0 Answers

Android Banner disappears after touching the screen 2 Answers

Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges