makeAdvertisement
Creating an Advertisement object and performing ad request.
This method is the one that creates and load the Advertisement. All parameters of the ad can be set using AdRequest and setAdRequestGlobalParameter.
In addition, when you try to load an AdPlacementType.INTERSTITIAL ad, you should not forget to pass the required placementType parameter.
The SDK also allows you to override the way ads are handled when they are tapped. In this case, you can implement your own TargetURLHandler implementation and pass it to the targetURLHandler parameter.
Note: Please note that your AdService must be successfully configured before calling this method. Otherwise, you will receive an AdError.Configuration error.
Return
The loaded Advertisement object or an error.
Parameters
The AdRequest instance, which describes a request parameters.
The AdPlacementType describing the expected type of placement for the Advertisement. The default value is AdPlacementType.INLINE. If you want to present an Ad as a interstitial you have to select AdPlacementType.INTERSTITIAL.
An optional object for tracking and processing Advertisement related events.
An optional TargetURLHandler object in which you can handle URLs that should be opened in the browser.