Package com.adcolony.sdk
Class AdColonyAdOptions
- java.lang.Object
-
- com.adcolony.sdk.AdColonyAdOptions
-
public class AdColonyAdOptions extends java.lang.ObjectAn optional object developers can pass toAdColony.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 Summary
Constructors Constructor Description AdColonyAdOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AdColonyAdOptionsenableConfirmationDialog(boolean confirmation_enabled)Enables or disables the confirmation dialog for rewarded interstitials, which will prompt the user before displaying the ad.AdColonyAdOptionsenableResultsDialog(boolean results_enabled)Enables or disables the results dialog for rewarded interstitials.java.lang.ObjectgetOption(java.lang.String key)Used to retrieve an arbitrary option with the given key.AdColonyUserMetadatagetUserMetadata()Deprecated.AdColonyAdOptionssetOption(java.lang.String key, boolean value)Optionally set an arbitrary key/value definitionAdColonyAdOptionssetOption(java.lang.String key, double value)Optionally set an arbitrary key/value definitionAdColonyAdOptionssetOption(java.lang.String key, java.lang.String value)Optionally set an arbitrary key/value definitionAdColonyAdOptionssetUserMetadata(AdColonyUserMetadata metadata)Deprecated.
-
-
-
Method Detail
-
enableConfirmationDialog
public AdColonyAdOptions enableConfirmationDialog(boolean confirmation_enabled)
Enables or disables the confirmation dialog for rewarded interstitials, which will prompt the user before displaying the ad.- Parameters:
confirmation_enabled- whether or not you'd like the confirmation dialog to be enabled.- Returns:
- 'this' for chaining calls.
-
enableResultsDialog
public AdColonyAdOptions enableResultsDialog(boolean results_enabled)
Enables or disables the results dialog for rewarded interstitials. The results dialog will appear after the ad is closed. For server-side reward enabled zones, the actual reward is asynchronous so the dialog may appear before a reward was granted.- Parameters:
results_enabled- whether or not you'd like the results dialog to be enabled.- Returns:
- 'this' for chaining calls.
-
setOption
public AdColonyAdOptions setOption(java.lang.String key, boolean value)
Optionally set an arbitrary key/value definition- Parameters:
key- the key for this option mapping.value- the value for this option mapping.- Returns:
- 'this' for chaining calls.
-
getOption
public java.lang.Object getOption(java.lang.String key)
Used to retrieve an arbitrary option with the given key.- Parameters:
key- the key of the option you wish to retrieve.- Returns:
- the value mapped to the provided key, or false if the mapping does not exist.
-
setOption
public AdColonyAdOptions setOption(java.lang.String key, double value)
Optionally set an arbitrary key/value definition- Parameters:
key- the key for this option mapping.value- the value for this option mapping.- Returns:
- 'this' for chaining calls.
-
setOption
public AdColonyAdOptions setOption(java.lang.String key, java.lang.String value)
Optionally set an arbitrary key/value definition- Parameters:
key- the key for ths option mapping.value- the value for this option mapping.- Returns:
- 'this' for chaining calls.
-
setUserMetadata
@Deprecated public AdColonyAdOptions setUserMetadata(AdColonyUserMetadata metadata)
Deprecated.Used to send AdColony extra information about this user.- Parameters:
metadata- the AdColonyUserMetadata object to send.- Returns:
- 'this' for chaining calls.
- See Also:
AdColonyUserMetadata
-
getUserMetadata
@Deprecated public AdColonyUserMetadata getUserMetadata()
Deprecated.Used to retrieve the currently set user metadata.- Returns:
- the currently set AdColonyUserMetadata object. Will return null if it has not been set.
- See Also:
AdColonyUserMetadata
-
-