Last active
April 19, 2018 15:23
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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