Hi there,
I have been trying to figure out a major issue on my game . My admob banner ad is showing just fine and attached to the camera but the issue is that the ads are not clickable.
Here's the preview of my code :
details: UNITY3D version : 4.6
Official admob plugin version : 2.3.0 or 2.3.1 (forgot)
my Assets>Plugins>Android>GoogleMobileAdsPlugin AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
This Google Mobile 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:minSdkVersion="9"
android:targetSdkVersion="19" />
<!-- Google Mobile Ads Permissions -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- Uncomment to add billing for in-app purchase ads -->
<!--<uses-permission android:name="com.android.vending.BILLING"/> -->
<application>
<!-- Admob Plugin value="true" -->
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik"
android:value="true" />
<!-- Denote the referenced Google Play services version -->
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<!-- Google Mobile Ads Activity -->
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<!-- InAppPurchase Activity -->
<activity android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity"
android:theme="@style/Theme.IAPTheme"/>
</application>
my BannerAd.cs which is attached in the camera
using UnityEngine;
using System.Collections;
using GoogleMobileAds;
using GoogleMobileAds.Api;
public class BannerAd : MonoBehaviour {
// Use this for initialization
void Start () {
RequestBanner();
}
void RequestBanner()
{
#if UNITY_ANDROID
string adUnitId = "ca-app-pub-xxxxx/xxxx";
#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);
}
}
Any help would be very thankful !