Xamarin
Xamarin copied to clipboard
Sample Xamarin projects
Xamarin
Contents
- Ads
- Taxonomic_Information
Ads
This sample Xamarin.Forms project demonstrates how to implement banner ads of different sizes and interstitial ads on iOS, Android and Windows(UWP) apps.
iOS and Android use Google's AdMob as an ad provider while Windows(UWP) uses Microsoft Store Services.
How-To
- PCL
- Implement
AdBanner.cs
- Implement
IAdInterstitial.cs
- Implement
- Android
- Install Xamarin.GooglePlayServices.Ads nuget
- Implement
AdBanner_Droid.cs
- Implement
IAdInterstitial_Droid.cs
- Change AdMob id for real ads
- iOS
- Install Xamarin.Firebase.iOS.AdMob nuget
- Implement
AdBanner_iOS.cs
- Implement
IAdInterstitial_iOS.cs
- Change AdMob id for real ads
- Windows(UWP)
- Install Microsoft Store Services SDK
- Implement
AdBanner_UWP.cs
- Implement
IAdInterstitial_UWP.cs
- Change ApplicationId and AdUnitId id for real ads
AdBanner
var adBanner = new AdBanner();
adBanner.Size = AdBanner.Sizes.MediumRectangle;
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns:Ad="clr-namespace:Ads;assembly=Ads"
..>
<Ad:AdBanner Size="Standardbanner"/>
</ContentPage>
AdInterstitial
IAdInterstitial adInterstitial = DependencyService.Get<IAdInterstitial>();
adInterstitial.ShowAd();
Taxonomic_Information
This sample Xamarin.Forms project searches and retrieves data from Integrated Taxonomic Information System (ITIS) by accessing web service APIs provided by ITIS.
All API descriptions and documentation can be accessed here