marcojak / MTAdmob

Admob plugin for Xamarin Android and iOS
https://www.xamarinexpert.it/admob-made-easy/
160 stars 26 forks source link

Where i need to put RewardedInterstitial #132

Open scascalesp opened 1 year ago

scascalesp commented 1 year ago

Hello Where i need to put RewardedInterstitial?

Here in net standard project?

public partial class AboutPage : ContentPage { protected override void OnAppearing() { base.OnAppearing();

     CrossMTAdmob.Current.LoadRewardedInterstitial("ca-app-pub-xxxxxxxxxxxxx");
     CrossMTAdmob.Current.ShowRewardedInterstitial();
  }
  }

I don't see in wikis Thx

marcojak commented 1 year ago

Don't call ShowRewardedInterstitial just after LoadRewardedInterstitial because you need to give time to load the interstitial. There are events you can use to check when the ad has been loaded.

Where you load an interstitial, is up to your logic, OnAppearing might be ok if this is what you prefer for your app

scascalesp commented 1 year ago

Hello. Moved to

  public AboutPage()
  {
     InitializeComponent();

     CrossMTAdmob.Current.LoadRewardedInterstitial("ca-app-pub-xxxxxx");
}

  private async void Button2_Clicked(object sender, EventArgs e)
  {
     CrossMTAdmob.Current.ShowRewardedInterstitial();
 }

}

On emulator nothing happends but said in console: Reward not loaded Thx

Kebechet commented 1 year ago

@marcojak the package readme contains They are implemented but currently they are not working. Probably something in the Admob SDK. I'm investigating it. for Rewarded Interstitial. Is this already resolved ?