get
The main method for parsing the result.
With its help, you will be able to implement the processing of successful and unsuccessful scenarios of the operation.
val result = AdService.makeAdvertisement(adRequest, adEventListener = adEventListener)
result.get(
onSuccess = {
// Do smth with the Advertisement
},
onError = {
// Do smth with the AdError
}
)
Content copied to clipboard
Parameters
onSuccess
The lambda function to be executed if the result is successful.
onError
The lambda function to be executed if the result is an error. Defaults to an empty lambda function.