public class AdColonyAdOptions
extends java.lang.Object
AdColony.requestInterstitial(String, AdColonyInterstitialListener, AdColonyAdOptions)
.
Used to set various options such as the use of confirmation and result dialogs for rewarded ads.
Extra information, such as various user metadata, can also be sent with this object which may
improve ad targeting.Constructor and Description |
---|
AdColonyAdOptions() |
Modifier and Type | Method and Description |
---|---|
AdColonyAdOptions |
enableConfirmationDialog(boolean confirmation_enabled)
Enables or disables the confirmation dialog for rewarded interstitials, which will prompt
the user before displaying the ad.
|
AdColonyAdOptions |
enableResultsDialog(boolean results_enabled)
Enables or disables the results dialog for rewarded interstitials.
|
java.lang.Object |
getOption(java.lang.String key)
Used to retrieve an arbitrary option with the given key.
|
AdColonyUserMetadata |
getUserMetadata()
Used to retrieve the currently set user metadata.
|
AdColonyAdOptions |
setOption(java.lang.String key,
boolean value)
Optionally set an arbitrary key/value definition
|
AdColonyAdOptions |
setOption(java.lang.String key,
double value)
Optionally set an arbitrary key/value definition
|
AdColonyAdOptions |
setOption(java.lang.String key,
java.lang.String value)
Optionally set an arbitrary key/value definition
|
AdColonyAdOptions |
setUserMetadata(AdColonyUserMetadata metadata)
Used to send AdColony extra information about this user.
|
public AdColonyAdOptions enableConfirmationDialog(boolean confirmation_enabled)
confirmation_enabled
- whether or not you'd like the confirmation dialog to be enabled.public AdColonyAdOptions enableResultsDialog(boolean results_enabled)
results_enabled
- whether or not you'd like the results dialog to be enabled.public AdColonyAdOptions setOption(@NonNull java.lang.String key, boolean value)
key
- the key for this option mapping.value
- the value for this option mapping.public java.lang.Object getOption(@NonNull java.lang.String key)
key
- the key of the option you wish to retrieve.public AdColonyAdOptions setOption(@NonNull java.lang.String key, double value)
key
- the key for this option mapping.value
- the value for this option mapping.public AdColonyAdOptions setOption(@NonNull java.lang.String key, @NonNull java.lang.String value)
key
- the key for ths option mapping.value
- the value for this option mapping.public AdColonyAdOptions setUserMetadata(@NonNull AdColonyUserMetadata metadata)
metadata
- the AdColonyUserMetadata object to send.AdColonyUserMetadata
public AdColonyUserMetadata getUserMetadata()
AdColonyUserMetadata