playMaker

Author Topic: AdMob actions  (Read 18028 times)

Nitrohex

  • Junior Playmaker
  • **
  • Posts: 50
Re: AdMob actions
« Reply #15 on: December 05, 2013, 11:37:45 AM »
Ok, i will try this out.

Thanks
Sign Up Now @ StartApp.com

TIGGYsmalls

  • Junior Playmaker
  • **
  • Posts: 80
Re: AdMob actions
« Reply #16 on: December 05, 2013, 11:53:48 AM »
Ok, it works fine on my phone, you can play the game and see the ads working but it wont run in Unity properly. I get this error.

JNI: Unable to find method id for 'getName'
UnityEngine.AndroidJavaObject:CallStatic(String, Object[])
AdvertisementHandler:HideAds() (at Assets/Plugins/AdMob/AdvertisementHandler.cs:97)


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: AdMob actions
« Reply #17 on: December 05, 2013, 11:56:23 AM »
Hi,

Have you passed this issue to the author? I think he will know what it means. I haven't yet developped for android, so can't really give you any hints...

bye,

Jean

Nitrohex

  • Junior Playmaker
  • **
  • Posts: 50
Re: AdMob actions
« Reply #18 on: December 05, 2013, 01:48:18 PM »
Ok, it works fine on my phone, you can play the game and see the ads working but it wont run in Unity properly. I get this error.

JNI: Unable to find method id for 'getName'
UnityEngine.AndroidJavaObject:CallStatic(String, Object[])
AdvertisementHandler:HideAds() (at Assets/Plugins/AdMob/AdvertisementHandler.cs:97)

I think the plugin does not work in the editor, you should try on a device or emulator (i use bluestacks)


Sign Up Now @ StartApp.com

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • Rage Quit Games - Coming Soon
Re: AdMob actions
« Reply #19 on: February 18, 2014, 10:18:21 PM »
The actions didn't work for me because there doesn't appear to be an AdvertisementHandler.cs included with the newer package, but i did notice that in the new package there is AdmobAd.cs so i went into that and i think i've solved the problem.

I've emailed NeatPlug to make sure the action is calling on the correct thing as i know next to nothing about scripting but it seems to work fine with the tests i've done.

Show Ad
Code: [Select]
using System;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("AdMob")]
[Tooltip("Shows the AdMob banner")]

public class ShowAdBanner : FsmStateAction {

public override void OnEnter(){
AdmobAdAndroid.Instance().ShowBannerAd();

Finish();

}
}

}


Hide Ad
Code: [Select]
using System;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("AdMob")]
[Tooltip("Shows the AdMob banner")]

public class HideAdBanner : FsmStateAction {

public override void OnEnter(){
AdmobAdAndroid.Instance().HideBannerAd();

Finish();
}
}
}

bizilux

  • Full Member
  • ***
  • Posts: 171
Re: AdMob actions
« Reply #20 on: February 25, 2014, 06:22:39 PM »
so will there ever be any actions for some plugin that displays admob interstitial ads...?

i mean this to me looks like quite highly requested thing... this topic was read 800 times for example, not to mention other similar topics...

so these 2 actions will work for showing interstitial ad, if i buy neatplug.com AdMob Ads Plugin???

MrMitch

  • Full Member
  • ***
  • Posts: 131
    • Rage Quit Games - Coming Soon
Re: AdMob actions
« Reply #21 on: February 25, 2014, 08:01:28 PM »
so will there ever be any actions for some plugin that displays admob interstitial ads...?

i mean this to me looks like quite highly requested thing... this topic was read 800 times for example, not to mention other similar topics...

so these 2 actions will work for showing interstitial ad, if i buy neatplug.com AdMob Ads Plugin???

No, these are for controlling Banner Ads.

I plan to look into Interstitial Ads, if i manage to get it working i'll post them here.

bizilux

  • Full Member
  • ***
  • Posts: 171
Re: AdMob actions
« Reply #22 on: February 26, 2014, 05:05:31 AM »
ah such a bummer... well hopefully you will have some luck...