public AndroidNativePromoAdapter(PromoAdPlacementContent placementContent)
        {
            var operations = placementContent.placementContentOperations as AndroidPromoAdOperations;

            if (operations != null)
            {
                this.nativeAdapter = operations.nativeAdapter;
            }
            this.metadata = placementContent.metadata;
        }
        private PromoMetadata GetMetadataForJavaObject(AndroidJavaObject metadataJavaObject)
        {
            var promoMetadata = new PromoMetadata
            {
                impressionDate = GetDateTimeFromJavaDate(metadataJavaObject.Call <AndroidJavaObject>("getImpressionDate")),
                offerDuration  = TimeSpan.FromSeconds(metadataJavaObject.Call <long>("getOfferDuration")),
                costs          = GetItemArrayFromJavaArray(metadataJavaObject.Call <AndroidJavaObject>("getCosts")),
                payouts        = GetItemArrayFromJavaArray(metadataJavaObject.Call <AndroidJavaObject>("getPayouts")),
                premiumProduct = GetPremiumProductFromJavaObject(metadataJavaObject.Call <AndroidJavaObject>("getPremiumProduct"))
            };

            return(promoMetadata);
        }
Exemplo n.º 3
0
 public EditorPromoAdOperations() : base()
 {
     metadata = new PromoMetadata
     {
         impressionDate = DateTime.Now,
         offerDuration  = TimeSpan.FromHours(3),
         premiumProduct = new Product
         {
             productId            = "FakeProductId",
             localizedTitle       = "Fake localized title",
             localizedDescription = "Fake localized description",
             localizedPrice       = new decimal(1.99),
             localizedPriceString = "$1.99",
             isoCurrencyCode      = "USD",
             productType          = "FakeProductType"
         },
         costs      = new PromoItem[] {},
         payouts    = new PromoItem[] {},
         customInfo = new Dictionary <string, object>()
     };
 }