How do I get the CrossMauiMTAdmob.Current.AdsId variable in my MainPage.xaml?
Opened this issue · 0 comments
rdemboski commented
My app.xaml.cs file contains this:
using Plugin.MauiMTAdmob;
namespace MauiApp2
{
public partial class App : Application
{
public App()
{
InitializeComponent();
// Set the Ad Unit ID based on the platform
CrossMauiMTAdmob.Current.AdsId =
DeviceInfo.Platform == DevicePlatform.Android
? "ca-app-pub-3940256099942544/8214777181"
: "ca-app-pub-3940256099942544/4255350878";
MainPage = new AppShell();
}
}
}
how can I use the value of CrossMauiMTAdmob.Current.AdsId in my MainPage.xaml?