Search Unity

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.7%
  2. No

    8.0%
  3. Not Completely

    25.3%
  1. demilp

    demilp

    Joined:
    Dec 6, 2012
    Posts:
    4
  2. aixaix

    aixaix

    Joined:
    May 7, 2010
    Posts:
    523
    Having the same issue! Any ideas?
     
  3. aixaix

    aixaix

    Joined:
    May 7, 2010
    Posts:
    523
    Never mind, found a fix somewhere in the thread.
     
  4. aixaix

    aixaix

    Joined:
    May 7, 2010
    Posts:
    523
    Or not, the line changing thing in AndroidManifest doesn't seem to fix the thing for me :/
     
  5. Wrolf

    Wrolf

    Joined:
    Mar 1, 2014
    Posts:
    2
    Got it working but I realized that it requests for the ad again whenever you restart your scene so the debug gets piled up and it uses more memory on your device. Any way to fix this?

    Edit: I'm basically having the same problem as Codest19 below me. I have a "restart" button and when I click it, the ad is laid on top of the old one and it keeps stacking like that I believe. So if I die 10 times and hit restart 10 times, I will have 10 ads and its using a lot of memory.
     
    Last edited: Mar 2, 2014
  6. Codest19

    Codest19

    Joined:
    Nov 24, 2012
    Posts:
    5
    I'm having some trouble hopefully someone can help me with. I have the ad prefab on the menu; it isn't destroyed on load so it will stay throughout my main scene which is what I want. But if I go back to the main menu I will have two ads laid on top of each other. I have tried Destroy(GameObject) with it before exiting to the menu but it doesn't seem to work. Then if I try HideAds() the newest one will follow it but the old one won't. Any help would be very appreciated.
     
  7. Nickprio

    Nickprio

    Joined:
    Mar 4, 2014
    Posts:
    3
    Hi
    I can't see on my phone the ads and i followed any istruction.
    I have tryed also with TestScene.unity changing only the Publisher ID but without results.
    Can anyone help me?

    I have Unity 4.3.0f4
     
  8. jonax

    jonax

    Joined:
    Oct 26, 2013
    Posts:
    6
    Anyone who love bubble wrap - don't skip that :p

    Just finished beta (I think) version of my game - Bubbles Challenge (Hell or Heaven ?)


    https://play.google.com/store/apps/details?id=jax.game.bubbleschallenge

    MicroEyes, I mentioned you just by nickname in "About" section, but I'm gonna change that for something better when I'll finish the game and it will be fully playable ;-)
     
  9. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    514
    I have this plugin working in my app from a few months back. However, I cannot change the ad size from the massive banner. I didn't notice until trying on a new Nexus 7 that the advert obliterates the bottom of the display. I'm sure I had smaller ads working as I updated the app for that very reason, to add less intrusive ads on mobile. The test scene shows smaller adverts but my game only shows the big banner no matter what ad size I select.

    Could there be something in my Admod account settings that force the banner size or something?
     
  10. Nickprio

    Nickprio

    Joined:
    Mar 4, 2014
    Posts:
    3
    Very good game ;) i tryed it but adds don't work....
     
  11. jonax

    jonax

    Joined:
    Oct 26, 2013
    Posts:
    6
    Don't work ?

    hmmm....


    They didn't show ?
    Or when you tried to click on them sth or excatly nothing happened ?


    Nickprio, please try again now and see what happens
     
  12. BonBons

    BonBons

    Joined:
    Jan 19, 2014
    Posts:
    5
    When I change scenes my ads overlap each other. I have called DisableAds(); but this isn't working. Could anyone explain how to properly do it?

    Thank you. (Amazing plugin by the way!)
     
  13. jonax

    jonax

    Joined:
    Oct 26, 2013
    Posts:
    6
    Do you call methods of AdvertisementHandler ?
    On first scene you should add that AdvertisementHandler prefab from MicroEyes package, and then you just call methods of floating in every scene AdvertisementHandler

    AdvertisementHandler.EnableAds();
    AdvertisementHandler.ShowAds();

    etc ...
     
  14. BonBons

    BonBons

    Joined:
    Jan 19, 2014
    Posts:
    5
    When I type this, I get this error message:

    Void Awake()
    {
    AdvertisementHandler.DisableAds();
    }

    "No overload for method 'DisableAds' takes '0' arguements.

    Could anyone help?
     
    Last edited: Mar 5, 2014
  15. Davitosan

    Davitosan

    Joined:
    May 10, 2013
    Posts:
    3
    //Disable Banner Ad
    AdvertisementHandler.DisableAds("Mic_1");

    //Disable Interstitial
    AdvertisementHandler.DisableAds("Mic_2");
     
  16. Disastorm

    Disastorm

    Joined:
    Jun 16, 2013
    Posts:
    87
    I just wanted to mention that DannyDan2468's build and MicroEye's most recent code (at least the code that I found in some SVN using google search) seem to have a bug where if you disable an ad before it appears, it doesn't actually get disabled. So for example, if you do EnableAds, it sends out the ad request, but the player quits the screen or whatever and you call DisableAds, but then the Ad is received, it will still display the ad and also re-enable it.

    I fixed this in my local build if anyone has this issue. Also the newest code doesn't have the special effects (fadeout, etc) when calling Hide or Show, it only happens on Disable or Enable, so I fixed that as well. Let me know if anyone wants my modified build of MicroEye's library. And yes, his most updated code does not require the READ_PHONE_STATE permission.
     
    Last edited: Mar 6, 2014
  17. jonax

    jonax

    Joined:
    Oct 26, 2013
    Posts:
    6
  18. sebasrez

    sebasrez

    Joined:
    Oct 29, 2012
    Posts:
    30
    Yes please share, that would be great
     
  19. Disastorm

    Disastorm

    Joined:
    Jun 16, 2013
    Posts:
    87
    Here you go, its the 2 .cs files for the project, and the updated Jar file.
    The way I used it is that I EnableAds("Mic_1") one time and then afterward just call HideAds("Mic_1") or ShowAds("Mic_1").
    I'm not sure if the interstitial stuff works.

    When I was about to upload the jar, I noticed some extra files in it that I don't think I needed, so I just left the "com" and "META-INF" folder, so I think that should work but let me know if it doesn't.

    View attachment $microEyesAdMob.rar
    View attachment $AdvertisementManager.cs
    View attachment $AdvertisementHandler.cs
     
  20. sebasrez

    sebasrez

    Joined:
    Oct 29, 2012
    Posts:
    30
    I tried it out and when clicked on show ad, the game crashes and opens up the ad automatically. The good side is that it does some to open only when I click show ad but any ideas on why it is crashing the game?
     
  21. squigglyo

    squigglyo

    Joined:
    May 21, 2012
    Posts:
    106
    Is there a way to tell when an ad is visible?

    At the moment, I have no idea if an ad was succesfully shown or not. I need to know if an ad is there, or if its just empty space. If it doesnt spawn an ad I plan to fill the space myself rather than leave it blank.
     
  22. MFen

    MFen

    Joined:
    Sep 25, 2013
    Posts:
    13
    Used in my game, Dododrop (by DPGaming not the other one). Credits page can be found in the settings. Thank you
     
  23. Nickprio

    Nickprio

    Joined:
    Mar 4, 2014
    Posts:
    3
    I do this in my Unity Project
    I use Unity 4.3.0 f4

    -I import the package
    -I go to my AdMob account and add from the store my APK and i active a banner
    -I add to the level settings the Demo Level at the first position
    -I open the Demo Level and configurate it with the banner id taken from AdMob
    -I insert the command to show the banner
    -I export the game using the id-key
    -I Install the game in my HTC One S
    -I run the game

    ...but nothing appears!

    PS:Sorry for my bad english
     
  24. matros

    matros

    Joined:
    Feb 1, 2014
    Posts:
    9
    MicroEyes, thanks for the plug-in.

    I have encountered the problem. When isTesting was true ads have been working great.
    But now app is finished and I set isTesting to false. Ads not showing anymore.

    Can You help me to resolve this problem?

    Edit: Well, figured out by myself.
     
    Last edited: Mar 10, 2014
  25. skedra

    skedra

    Joined:
    Nov 30, 2012
    Posts:
    5
  26. matros

    matros

    Joined:
    Feb 1, 2014
    Posts:
    9
  27. FabrizioSpadaro

    FabrizioSpadaro

    Joined:
    Jul 10, 2012
    Posts:
    272
    Does this plugin support interstitial ads??
     
  28. sebasrez

    sebasrez

    Joined:
    Oct 29, 2012
    Posts:
    30
    same thing as noted above... as soon as the ads are loaded it plays the ad. I am trying to set it to hide as soon as it is instantiated so that I can show it when I want to. anyone been able to fix this?
     
  29. Pandamonium99

    Pandamonium99

    Joined:
    Jul 16, 2012
    Posts:
    14
    So im new to this, so im sure im screwing something up, but I installed the plugin. I then opened the test scene just to see if it actually displays ads, if I test in unity it gives me the error: Exception: JNI: Init'd AndroidJavaClass with null ptr!
    UnityEngine.AndroidJavaClass..ctor (IntPtr jclass)
    UnityEngine.AndroidJavaObject.get_JavaLangClass ()
    UnityEngine.AndroidJavaObject.FindClass (System.String name)
    UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className)
    UnityEngine.AndroidJavaClass..ctor (System.String className)
    AdvertisementHandler.Instantiate (System.String pubID, AdvSize advSize, AdvOrientation advOrient, Position position_1, Position position_2, Boolean isTesting, System.String testDeviceId, AnimationInType animIn, AnimationOutType animOut, LevelOfDebug levelOfDebug) (at Assets/Scripts/Mics/Advertisement/AdvertisementHandler.cs:87)
    AdvertisementManager.Start () (at Assets/Scripts/Mics/Advertisement/AdvertisementManager.cs:169)

    And doesnt do anything from there. When i add it to my game it shows but no ad's pop up or are called, even when i try everything ><. What am I missing here?
     
  30. hek

    hek

    Joined:
    Dec 4, 2013
    Posts:
    1
    Great work!
    I don't know if it was said before, but how can I have multiple ads on one scene.
    I try to add prefab twice to the scene(set two different id's and placement of ads), but just one is displayed.
     
  31. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    441
    i stil can't use it
    which script should i add to it ?
    what is the correct values ?
    is there any code i should write ?
     
  32. wtsang01

    wtsang01

    Joined:
    Dec 4, 2013
    Posts:
    8
    Hi. Thanks for the awesome plugin.

    Everything works except for this:
    The issue happens if the ad was requested by not returned, then when I call Application.Quit(), my game will just hang on black screen until ad comes in( sometimes never). I have tried

    AdvertismentHandler.DisableAds();
    Destory(AdPrefab);

    Please tell my any solution on how to fix this. Thanks.
     
  33. MadJohny

    MadJohny

    Joined:
    Mar 8, 2013
    Posts:
    143
    Is admob safe? I heard that sometimes it bans people for no reason at all...
     
  34. jonax

    jonax

    Joined:
    Oct 26, 2013
    Posts:
    6
    can you elaborate on that ?
     
  35. Celovis

    Celovis

    Joined:
    Feb 26, 2014
    Posts:
    4
    I have finally decided to ask, instead of spending any more time on figuring out the problem...

    I cannot get the AdBanner to ever be displayed. I replaced my advert id, I dragged and dropped your prefab (it popped up on my phone, so I know at least the script was being executed). I downloaded the android admob sdk (I think its googleplay sdk), and unity admob sdk.


    I cannot figure out how to get my app to display the ads! Nothing happens!!!!! Any tips?
     
  36. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    441
    is it work for unity free version ?
    i tried aa lot but nothing happen
     
  37. Eldirfar

    Eldirfar

    Joined:
    Feb 9, 2014
    Posts:
    39
  38. dodgeitpiggy

    dodgeitpiggy

    Joined:
    Mar 18, 2014
    Posts:
    2
  39. Weirdo Studios

    Weirdo Studios

    Joined:
    Feb 11, 2014
    Posts:
    1
    I get exactly the same issue.... I have through all the above and all the pages. I downloaded the new SDK tried all the forms of my PublisherID and Is testing on and off but still no ads show up... Could someone write me a step by step to add ads to the app because at the moment i think i am missing a vital step to getting this to work?

    Weirdo Studios

    The app I intend to use this in : https://play.google.com/store/apps/details?id=weirdostudios.com.narwars.www ( it will be free if i get ads working on the app)
     
  40. wtsang01

    wtsang01

    Joined:
    Dec 4, 2013
    Posts:
    8
    Even though this problem still happens , I have decided to release the game: IMPOSSIBLE SURVIVAL . I would still like an answer to my problem if anyone knows how to solve.
     
  41. Xystus

    Xystus

    Joined:
    Feb 12, 2014
    Posts:
    1
    @MicroEyes are you planning to add support to interstitial ads?
     
  42. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,254
    Any news on a possible fix for this. It's the only issue I'm having with what is otherwise an awesome addon.

    Many thanks.
     
  43. johnyfoxter

    johnyfoxter

    Joined:
    Nov 3, 2013
    Posts:
    20
    Deprecated. On August 1, 2014, Google Play will stop accepting new or updated apps that use the old standalone Google Mobile Ads SDK v6.4.1 or lower. You must upgrade to the Google Play version of the Mobile Ads SDK by then.
     
  44. whistler

    whistler

    Joined:
    Apr 15, 2013
    Posts:
    15
    @MicroEyes , just wondering if you are still developing this addon or not ?
     
  45. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,254
    I've released a small game using this addon https://play.google.com/store/apps/details?id=com.doofah.pobble

    Shame about the bug, but it only seems to be a problem on slower devices as far as I can tell, and even then it doesn't happen all the time as long as you can contrive a way to give the adds a reasonable time to load.
     
  46. yigityildirim

    yigityildirim

    Joined:
    Mar 20, 2014
    Posts:
    1
    Where will I call this code? I mean where will I put this code?

    EnableAds():
     
  47. MicroEyes

    MicroEyes

    Joined:
    Jul 3, 2012
    Posts:
    309
    Hey, I am still developing supporting.
     
  48. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,254
    Very glad to hear it :)

    Have you got a news on a fix for this yet, or a workaround perhaps?

     
  49. NickP_2

    NickP_2

    Joined:
    Jul 9, 2013
    Posts:
    61
    First off: Thanks for sharing this great plugin, it worked perfectly for me. But one big problem: It messed up my GUILayout... I asked a question you can find here

    Thanks
     
  50. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    441
unityunity