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 Rellac · Apr 13, 2014 at 03:21 PM · androidadmob

Can't click Ads with AdMob

I have recently finished an android game and I am struggling to enable my ads. They show just fine whenever I want them to, but I can't seem to click them at all. I think the issue may be within my manifest file, but through all my googling I found no solutions that seemed to work for me.

Here is my AndroidManifest.xml:

 <manifest
     xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.unity3d.player"
     android:installLocation="preferExternal"
     android:versionCode="1"
     android:versionName="1.0">
     <supports-screens
         android:smallScreens="true"
         android:normalScreens="true"
         android:largeScreens="true"
         android:xlargeScreens="true"
         android:anyDensity="true"/>

     <application
         android:icon="@drawable/app_icon"
         android:label="@string/app_name"
         android:debuggable="true">
         <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
         <activity android:name="com.unity3d.player.UnityPlayerProxyActivity"
                   android:label="@string/app_name"
                   android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
         <activity android:name="com.unity3d.player.UnityPlayerActivity"
                   android:label="@string/app_name"
                   android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
         </activity>
         <activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
                   android:label="@string/app_name"
                   android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
             <meta-data android:name="android.app.lib_name" android:value="unity" />
             <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
         </activity>
         <activity android:name="com.unity3d.player.VideoPlayer"
                   android:label="@string/app_name"
                   android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
         </activity>
         <activity android:name="com.google.ads.AdActivity"
                   android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
     </application>
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
 </manifest>

This is located within Assets > Plugins > Android, the files I have located within here are as such:

  • AndroidManifest.xml

  • com.microeyes.admob.jar

  • GoogleAdMobAdsSdk-6.0.1.jar

There are no objects in front of the ad. My game consists of an empty screen with few objects falling occasionally. These objects can (read: can't) be seen behind the Ad.

This line is one that I found from Unity Answers and may or may not be used properly here (Line 18):

 <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />

I used This source (Android version) to create the ads. They generate just fine using the cs scripts, only touching them takes me to no source.

Within my Ad Manager file, I have input my AdMob code. However, I'm unsure if I need all of the information that I have put here. I am using the format:

ca-app-pub-XXXXXXXXXXXXXXXXX/XXXXXXXXXX

Each X representing a number (can't link that thing) - is this the correct format? I am unsure or if I should be using the "ca-app-pub" section, or if I need only the numbers from one side of the /.

Any help would be greatly appreciated, thanks. Any more required information can be given, but I believe this is all that is required.

AdvertisementManager.cs

AdvertisementHandler.cs

Comment
Add comment · Show 4
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 OSG · Apr 14, 2014 at 09:58 AM 0
Share

You should use all "ca-app-pub-XXXXXXXXXXXXXXXXX/XXXXXXXXXX" string, so you doing it right.

EDIT: It would be better to use google play service's ads, becouse Google will stop supporting Ad$$anonymous$$ob service at 1st August. I use this free asset

avatar image Rellac · Apr 14, 2014 at 01:55 PM 0
Share

But this is still admob, though?

avatar image OSG · Apr 15, 2014 at 05:18 AM 0
Share

I think yes, it is still admob. I$$anonymous$$HO they just whant to unite all their small services in one big service.

avatar image Skamo · Sep 24, 2014 at 06:42 PM 0
Share

I've the same problem, I added the ad$$anonymous$$ob plugin, the ads are displaying but when you click on them nothing happens. What did you mean when you said that you threw your meta file in the apllication tag? How do i do that?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by hamstar · Apr 14, 2014 at 09:17 AM

At a glance I can see you're missing at least one thing from your manifest, but I'm not sure if there are any other issues. You need the following line that should go within the application tag.

 <meta-data android:name="com.google.android.gms.version"
                android:value="@integer/google_play_services_version"/>

I don't think you're using the latest version of the plugin. You can get v2.0 here. Make sure you follow the setup guide carefully and see if you have any more problems.

Comment
Add comment · Show 1 · 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 Rellac · Apr 14, 2014 at 01:56 PM 0
Share

It seemed the issue was that I had simply put my meta file in the wrong place, I was meant to actually throw it within the application tag, rather than just outside it as I had been doing. Thanks for the assist, though!

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

25 People are following this question.

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

Related Questions

Admob on iOS and Android. Interstitial ads are showing but events are not firing. 1 Answer

Two Android Manifest file in same folder 1 Answer

Google Admob (V.6.1.2) crashing Android game on device built with Unity 2020.3.19 1 Answer

How to implement Admob Native Ads on a ScrollRect in Unity 2 Answers

Problem with closing an android app 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