Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Admob Unity Package that work with Unity 3.2 above

Discussion in 'Android' started by MicroEyes, Mar 8, 2013.

?

Are you Satisfy with this Plugin Tutorial

  1. Yes

    66.9%
  2. No

    8.0%
  3. Not Completely

    25.1%
  1. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    471
    admobPluginClass.CallStatic("AdvHandler", (int)Activity.ENABLE, currActivity, "", -1, -1, -1, -1,true, "", -1, -1, -1);

    problem in this clause ?


    NullReferenceException: Object reference not set to an instance of an object
    AdvertisementHandler.EnableAds () (at Assets/AdvertisementHandler.cs:100)
    AdvertisementManager.OnGUI () (at Assets/AdvertisementManager.cs:16)

    helpppppppp microeyes
     
  2. ckrin

    ckrin

    Joined:
    Oct 8, 2013
    Posts:
    36
    hey,
    got a little problem. anything works like a charm if i use the prefab as it is. but if i enter my personal admob id, advertisment is not showed.

    any ideas? thanks in advance! cant wait to get things running! awesome plugin!
     
  3. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,732
    Have you made sure you are using the ad ID, looks like ca-app-xxxxxxxxxxxxxxxxxxx ?

    If you use your publisher ID (pub-xxxxxxxxxxxxxxxxxxxxxx) it won't work.
     
  4. Sandy Sandals

    Sandy Sandals

    Joined:
    Jan 11, 2014
    Posts:
    1
    Hi there,

    I have implemented the plugin and the adds show up correctly, but how do I test to make sure that this is actually linked to my AdMob account? Right now if I click the ad nothing happens. Is it meant to be this way? Sorry if this is a really really dumb question! isTesting is set to false if that makes a difference. Although I am also getting an error if I run the game in the editor but i believe that that is normal? This is the error;

    Exception: JNI: Init'd AndroidJavaClass with null ptr!

    Thanks!
     
  5. Budgieboy

    Budgieboy

    Joined:
    Sep 6, 2012
    Posts:
    39
    God, can someone please create a decent step by step tutorial.

    Is that really to much to ask? Please!
     
  6. sebasrez

    sebasrez

    Joined:
    Oct 29, 2012
    Posts:
    33
    This step by step tutorial helped me get my ads.

    I will most likely make a video of this when it is more complete because I still can't enable disable whenever I want.
     
    Last edited: Mar 26, 2014
  7. 3dhelsel

    3dhelsel

    Joined:
    Mar 26, 2014
    Posts:
    3
    Im having trouble Accessing the plugin. All I get is a *.php file.
     
  8. sebasrez

    sebasrez

    Joined:
    Oct 29, 2012
    Posts:
    33
  9. 3dhelsel

    3dhelsel

    Joined:
    Mar 26, 2014
    Posts:
    3
    Same thing... Hmm. I'll try a different browser
     
  10. DanielFox

    DanielFox

    Joined:
    Apr 9, 2013
    Posts:
    6
    Hey guys, my banner is showing up just fine but I can't click it...
    I'm testing it on a Samsung S2.

    Any ideas?
     
  11. sebasrez

    sebasrez

    Joined:
    Oct 29, 2012
    Posts:
    33
    try this

    Apply the ForwardNativeEventsToDalvik fixby seawolfff, Page 17

    I used your files and ads are working but I can't click the ads. Should this work? can you help me

    SOLVED: this helps http://forum.unity3d.com/threads/195...-not-clickable

    I just had this problem again after the 4.3 update and fixed it. I had to edit the manifest and change which Activity the ForwardNativeEventsToDalvik was called from due to a change in Unity 4.3.

    Move the line:
    <meta-data android:name="unityplayer.ForwardNativeEventsToDal vik" android:value="true" />

    To the activity UnityPlayerProxyActivity. Aka right before the line with </Activity> like this:

    Code:
    <activity android:name="com.unity3d.player.UnityPlayerProxyA ctivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboard Hidden|locale|mnc|mcc|navigation|orientation|scree nLayout|screenSize|smallestScreenSize|uiMode|touch screen" android:screenOrientation="landscape">

    <intent-filter>

    <action android:name="android.intent.action.MAIN" />

    <category android:name="android.intent.category.LAUNCHER" />

    </intent-filter>

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

    </activity>
     
  12. Budgieboy

    Budgieboy

    Joined:
    Sep 6, 2012
    Posts:
    39
    Thanks dude it worked, I think

    There's a banner there but it was grey with a small with a small 'i' in the corner and It loaded up the browser when I pressed it.

    I was only on crappy really slow mobile internet so I didn't bother letting it load, I'm guessing it's working though right?
    But there isn't anything on the admob account saying there was any views.
     
  13. sebasrez

    sebasrez

    Joined:
    Oct 29, 2012
    Posts:
    33
    make sure that it is the exact admob id from you account being used. I placed it right into the script just to be sure.
     
  14. Budgieboy

    Budgieboy

    Joined:
    Sep 6, 2012
    Posts:
    39
    "ca-app-pub-NUMBERS/NUMBERS" All that right?

    What about the bundle identifier? I changed it to match what I put in Unity in the /plugins/android manifest, is that correct? if so anywhere else I need to?

    Thanks again :D
     
  15. sebasrez

    sebasrez

    Joined:
    Oct 29, 2012
    Posts:
    33
    Right, that is all correct. There might also be a lag between the admob site and app which happened to me and someone I know but it sounds like everything else is working, especially if the app isn't linked or recently linked.
     
  16. Egisto

    Egisto

    Joined:
    May 9, 2013
    Posts:
    9
    Thanks DannyDan for your update of the plugin.

    I've done all the changes to have admob working without the READ_PHONE_STATE permission. The Ads are showing ok but I can't disable them. I made no changes to your code, just uncomment the line DrawBannerAdvs();

    The buttons appear, the ads appears too but... when I press the disable button nothing happens.

    I appreciate your help.

    Regards
     
  17. alfitejedor

    alfitejedor

    Joined:
    Sep 12, 2012
    Posts:
    1
    Hi there!!

    I'm having some problems trying to test the ads. I've followed all the instruction and the plugin works fine, but I would like to know how to show test banners. I edited and uncommented everything I found about testing variables and device id, but the game crashes when I launch it on my device.

    Thanks in advance!!
     
  18. shakac

    shakac

    Joined:
    Mar 1, 2014
    Posts:
    3
    Thank you man
    u saved my whole day.
    so many thank you
    thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank youthank you thank youthank you thank youthank you thank youthank you thank youthank you thank youthank you thank youthank you thank youthank you thank youthank you thank you
     
  19. sheffieldlad

    sheffieldlad

    Joined:
    Oct 9, 2013
    Posts:
    154
    message received when uploading my finished APK to google play services:

    Upload failed

    You need to use a different package name because "com.microeyes.admob" already exists in Google Play.

    anybody got a fix?
     
  20. ckrin

    ckrin

    Joined:
    Oct 8, 2013
    Posts:
    36
    is com.microeyes.admob the packetname in your android build settings? if so, rename it to com.sheffieldlad.yourgamename
     
  21. SatsArtsStudio

    SatsArtsStudio

    Joined:
    Apr 5, 2014
    Posts:
    10
    I now have an ad that have a Animtion, but it never goes out, it stays in the position and dont move!
    How can i hide after 2 seconds? something like that...

    Thanks in Advance
     
  22. Goliath520

    Goliath520

    Joined:
    Nov 24, 2012
    Posts:
    7
    Is there a specific animation you had planned or did you plan to just use the build in hide ad function. If you wanted to use a wait after 2 seconds you would need a IEnumerator with a waitforseconds. Something like this:

    Then just call HideAdsAfterTwoSeconds when ever you want. If this isn't what you wanted, please clarify.

    I also have a question. I updated some of the lines of code as suggested through out this forum but seem to be having a bit of a problem. The ads are enabled but on matter what I do, when I call to show the ads it doesn't work needless to say when it tries to hide the ads it gets stuck.


    I am using "AdvertisementHandler.EnableAds("Mic_1");" and "AdvertisementHandler.ShowAds("Mic_1");" to enable and show but only enable is working. "AdvertisementHandler.ShowAds("Mic_1");" works in the unity player but it doesn't work when I test it on an android device (tried on a few), enable works on both.

    The advertisement handler portion of the code looks like this:
    Any ideas?

    Edit: the quote I have below fixed the problem.
     
    Last edited: Apr 18, 2014
  23. Goliath520

    Goliath520

    Joined:
    Nov 24, 2012
    Posts:
    7
    I just want to bring this back. I had a problem so I went back to this and fixed the problem. I feel like this post alone solves a lot of problems.
     
  24. MicroEyes

    MicroEyes

    Joined:
    Jul 3, 2012
    Posts:
    309
    New Plugin Version will be out by next weekend with
    1. Integration with Google Play Service
    2. Interstitial Ads
    3. Callback from plugin on Ads events
    4. More control on Ads
    5. Other features Fixes.

    Thanks for your support guys.
    :D
     
  25. javanoob

    javanoob

    Joined:
    Aug 15, 2012
    Posts:
    64
    Thanks Microeyes you are a genius :)
     
    Last edited: Apr 20, 2014
  26. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    This plug-in is awesome and sooo simple to integrate. I can't wait for the Interstitial Ads

    Thanks MicroEyes :D
     
  27. SatsArtsStudio

    SatsArtsStudio

    Joined:
    Apr 5, 2014
    Posts:
    10
    i have a problem with your plugin, i want the ad to smoothly animate in and then fade out right on time? Can someone help me!
     
  28. SatsArtsStudio

    SatsArtsStudio

    Joined:
    Apr 5, 2014
    Posts:
    10
    Thanks, but should i just us this code in a new script?
     
  29. SatsArtsStudio

    SatsArtsStudio

    Joined:
    Apr 5, 2014
    Posts:
    10
    I just got this error: Assets/Scripts/HideAfter2Seconds.cs(6,47): error CS1519: Unexpected symbol `HideAdsAfterTwoSeconds' in class, struct, or interface member declaration

    im new in scripting....
     
  30. SunixDev

    SunixDev

    Joined:
    Mar 1, 2014
    Posts:
    49
    Thank you very much MicroEyes and thanks to keep the work on it , very good plugin
     
    Last edited: Apr 23, 2014
  31. shino-kaze

    shino-kaze

    Joined:
    Apr 24, 2014
    Posts:
    2
    Thank very much MicroEyes you save me ^^
     
  32. kwanzai

    kwanzai

    Joined:
    Apr 28, 2014
    Posts:
    5
    I just wanted to say thanks for the very useful plugin.
    I have used it in my new game, Fast Faller, which will have your name in the credits :)

    Fast Faller Homepage

    Google Play - Fast Faller

    I am very much looking forward to updates on this plugin.
     
  33. javanoob

    javanoob

    Joined:
    Aug 15, 2012
    Posts:
    64
    I would like to say THANK YOU MicroEyes :) ,I am STILL using your previous plugin (other thread) and my Admob is finally showing up as paying :)

    heres my little game thats doing quite nicely :) ,Hope you Enjoy it :) ,Looking forward to your latest Plugin release ,although I admit I have nooooo idea how all this admob stuff works to be honest but at least its working lol :)

    https://play.google.com/store/apps/details?id=com.NonLinearGames.mak

    By the way I have all my Default eCPM - USD ($) at the standard rate 0.01 I believe ,what should this be set to ? I truly am lost at this point lol ,and does it cost me to have campains and House ads ? .I wish their was a huge easy readme to all this Admob stuff ,on the plus side I have earnt about £7 so far lol ;0
     
    Last edited: May 5, 2014
  34. bhdrygn11

    bhdrygn11

    Joined:
    Jul 28, 2013
    Posts:
    4
    Hi,
    I have a problem , when I change publisher id there is no ad

    What is it ?
     
  35. javanoob

    javanoob

    Joined:
    Aug 15, 2012
    Posts:
    64
    Hi ,me again ,question it says to set up a campain that you set a daily budget (minimum $10) stupid question does this mean I have to spend $10 every day to Admob to get a campain running ????? .Please can anyone answer this as I am confused because this sounds like a lot of layout of cash daily to be spending ..

    Enter your daily budget (minimum $10). You can control the maximum amount of ad spend per day by setting a campaign daily budget for your ads.
    Each day, all ads running in your account are served until the budget you set is depleted, after which your ads are paused until the following day, or until you increase your budget or replenish the funds in your account.

    totally lost now and wondering if Admob is any use at all ? ,please can someone who has been using admob give me some pointers :)
     
  36. Thangoldaar

    Thangoldaar

    Joined:
    May 15, 2014
    Posts:
    4
    I can not find the download link for new version.
     
  37. bikada

    bikada

    Joined:
    Jan 13, 2014
    Posts:
    4
    $???? 2014-05-16 4.21.01 PM.jpg

    it doesnt work on my project both android and ios...
    and unable to build out to test.
    could you help he to solve this issue?
    thanks
     
  38. haodengli

    haodengli

    Joined:
    Jan 14, 2012
    Posts:
    19
    Looking forward to the new version;)
     
  39. Brianga

    Brianga

    Joined:
    Mar 28, 2014
    Posts:
    6
    how with this plugin add Interstitial ???
    please i need help
     
    Last edited: May 19, 2014
  40. PerfectlyInsane

    PerfectlyInsane

    Joined:
    Aug 9, 2013
    Posts:
    74
    Man your my hero.. I tried over 8 hours to get it to work with Facebook.. Amazing it just works so easily. Just plug and play the way its meant to be.

    Other than the odd bug that appears if it is run in the unity editor which no biggy,i can get around by only testing on the android device or making certain bits or whole bits disabled if running in the unity editor.
     
  41. FrosTech

    FrosTech

    Joined:
    Jul 3, 2013
    Posts:
    6
    Waiting for the latest update for Unity 3.5 !
     
  42. javanoob

    javanoob

    Joined:
    Aug 15, 2012
    Posts:
    64
    Can anyone please help ,me out lol ,I now have 48,000 downloads and have earnt wait for it $3 yes 3 bucks lol ^ ^ has anyone here used admob and do we have to add all the extra advertisers like Adfonic,Inmobi ,Adfalcon etc and integrate all there sdks and plugins to actually earn any money ? please give me a clue before I give up and just go for paid apps because 3 dollars for nearly fifty thousand downloads is a joke .. Anyone have a clue if Admob is any use at all or am I doing it wrong lol ,please point me to a website or something where someone explains how to actually earn some money ..
     
  43. agustito37

    agustito37

    Joined:
    Mar 30, 2014
    Posts:
    1
    Hi,
    First, i want to thank you for the plugin, is awesome and it works prefectly. Then i want to ask you a little question, i am new with unity and admob, and i am trying to figure out how this plugin works. So my dumb question is, when i hide the ads with hideads(), are impressions incrementing when advs auto refresh? or maybe, arent advs auto refreshing when you use that function?
    Bye, thanks.

    PD: sorry my bad english.
     
  44. mntcarp

    mntcarp

    Joined:
    Dec 12, 2011
    Posts:
    25
  45. rjdfhorn2006

    rjdfhorn2006

    Joined:
    Jun 14, 2010
    Posts:
    141
    Does anyone have an issue of ads occasionally disappearing from the screen? I've tried this plugin with internet connections that aren't too great and sometimes the ads disappear. If they disappear and you click where the ads position, you'll go to the ad's website - this could be pretty annoying since the player may tap the ad's position on the screen and be redirected to the ad's website even though they don't see an ad. Anyone have any ideas about this?
     
  46. przem997

    przem997

    Joined:
    Dec 10, 2012
    Posts:
    80
    I display advertisements from MicroEyes plugin, I change ID to my Admob.
    My advertisements are set to a specific color - orange - white
    Advertisements have my colors and other time have basic color black-and-white.
    Why sometimes I have ads not my color?
    MicroEyes include own advertisements ?

    I sometimes display MicroEyes advertisements and sometimes my ads?
     
  47. MicroEyes

    MicroEyes

    Joined:
    Jul 3, 2012
    Posts:
    309
    Dear przem997,
    For Your Information, its a plugin, for free. I do not earn anything out of it. There is no secret code. Configure plugin settings for output.
    If you think, there is any secret code, then don't use it OR come up with evidence i'll close this plugin immediately.
    And my name is MicroEyes.
     
  48. przem997

    przem997

    Joined:
    Dec 10, 2012
    Posts:
    80
    I reply:
    My advertisements are set to a specific color - orange - white
    Advertisements have my colors and other time have basic color black-and-white.
    Why sometimes I have ads not my color?
     
  49. FiveFingers

    FiveFingers

    Joined:
    Oct 15, 2009
    Posts:
    541
    That is probably a problem related to the recent change at AdMob, from the old to the new system, have you updated your adMob account recently ?
     
  50. przem997

    przem997

    Joined:
    Dec 10, 2012
    Posts:
    80
    I have 2 admob account: new and old - there is the same problem.

    I talked on the phone with consultant Google Admob.
    The consultant said that they have no problems with the display of color ads.
    The problem is unknown to him. He speak to me that not possible.

    I wrote to the Unity and Google for subsequent verification of the case.
    I donate this plugin and I want to know what is with my advertisements.

    If my legitimate concerns not confirmed, I will continue to donate this plugin.
     
    Last edited: Jun 27, 2014