Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Last active April 19, 2018 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juucustodio/00877ae707ed59668d3d03a6f3dbbc6d to your computer and use it in GitHub Desktop.
Save juucustodio/00877ae707ed59668d3d03a6f3dbbc6d to your computer and use it in GitHub Desktop.
Example how to monetize yours Xamarin.Forms applications with AdMob by Google - http://julianocustodio.com/admob-xamarin-forms
using Xamarin.Forms;
namespace DemoAdMob
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
BindingContext = this;
if (Device.RuntimePlatform == Device.Android)
adMobView.AdUnitId = "SEU ID ANDROID";
else if (Device.RuntimePlatform == Device.iOS)
adMobView.AdUnitId = "SEU ID iOS";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment