public void jsonAvailableDelegate(string jsonData) { jsonDownloaded = true; currentAd = PictureAdsParser.parseJSONString(jsonData, Application.temporaryCachePath + "/"); if(currentAd == null || !currentAd.adIsValid()) {pictureAdFailed();return;} requestManager.downloadResourcesForAd(_network, this, currentAd); }
public void jsonAvailableDelegate(string jsonData) { jsonDownloaded = true; currentAd = PictureAdsParser.parseJSONString(jsonData, Application.temporaryCachePath + "/"); if (currentAd == null || !currentAd.adIsValid()) { pictureAdFailed(); return; } requestManager.downloadResourcesForAd(_network, this, currentAd); }
void removeLocalResources(PictureAd ad) { if (!ad.adIsValid()) { return; } System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Landscape, ImageType.Close)); System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Landscape, ImageType.Frame)); System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Landscape, ImageType.Base)); System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Portrait, ImageType.Close)); System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Portrait, ImageType.Base)); System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Portrait, ImageType.Frame)); }
void removeLocalResources(PictureAd ad) { if (!ad.adIsValid()) return; System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Landscape, ImageType.Close)); System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Landscape, ImageType.Frame)); System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Landscape, ImageType.Base)); System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Portrait, ImageType.Close)); System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Portrait, ImageType.Base)); System.IO.File.Delete(ad.getLocalImageURL(ImageOrientation.Portrait, ImageType.Frame)); }
public bool isAdAvailable() { return(areResourcesReady() ? (currentAd.adIsValid() && currentAd.resourcesAreValid() && (framesManager != null ? framesManager.adIsClosed() : true) && !isShowingAd()) : false); }