Package com.adcolony.sdk
Class AdColonyZone
- java.lang.Object
-
- com.adcolony.sdk.AdColonyZone
-
public class AdColonyZone extends java.lang.ObjectHolds all information related to a zone. Can be retrieved at any time viaAdColony.getZone(String). Object will be incomplete (information will not be valid) if AdColony has not been configured.
-
-
Field Summary
Fields Modifier and Type Field Description static intBANNER1 An integer constant representing a display zone type.static intINTERSTITIAL0 An integer constant representing an interstitial zone type.static intNATIVEDeprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPlayFrequency()Used to retrieve the play frequency for this zone (i.e.intgetRemainingViewsUntilReward()Used to retrieve the remaining number of ads that must be watched before a reward is given.intgetRewardAmount()Used to retrieve the reward amount tied to each reward event.java.lang.StringgetRewardName()Used to retrieve the name of the reward currency as defined on this zone's page on our dashboard.intgetViewsPerReward()Used to retrieve the number of ad views necessary for a reward.java.lang.StringgetZoneID()Used to retrieve the zone id tied to this object.intgetZoneType()Used to retrieve the type of zonebooleanisRewarded()Used to retrieve information on whether or not this zone has rewards enabled.booleanisValid()Used to retrieve information on whether or not this zone is valid.
-
-
-
Field Detail
-
INTERSTITIAL
public static final int INTERSTITIAL
0 An integer constant representing an interstitial zone type.- See Also:
- Constant Field Values
-
BANNER
public static final int BANNER
1 An integer constant representing a display zone type.- See Also:
- Constant Field Values
-
NATIVE
@Deprecated public static final int NATIVE
Deprecated.2 An integer constant representing an native zone type.- See Also:
- Constant Field Values
-
-
Method Detail
-
getZoneID
public java.lang.String getZoneID()
Used to retrieve the zone id tied to this object.- Returns:
- the zone id tied to this object. Will return an empty String if AdColony is disabled.
-
getRemainingViewsUntilReward
public int getRemainingViewsUntilReward()
Used to retrieve the remaining number of ads that must be watched before a reward is given. This option can be configured on your zone's page on our dashboard. Default is one view per reward.- Returns:
- the number of remaining views until a reward will be given. Will return 0 if AdColony is disabled.
-
getRewardAmount
public int getRewardAmount()
Used to retrieve the reward amount tied to each reward event. This value is set on this zone's page on our dashboard.- Returns:
- the reward amount tied to each reward event. Will return 0 if AdColony is disabled.
-
getRewardName
public java.lang.String getRewardName()
Used to retrieve the name of the reward currency as defined on this zone's page on our dashboard.- Returns:
- the name of the reward currency tied to each reward event. Will return an empty String if AdColony is disabled.
-
getViewsPerReward
public int getViewsPerReward()
Used to retrieve the number of ad views necessary for a reward. This option is set on this zone's page on our dashboard.- Returns:
- the number of ad views required for each reward. Will return 0 if AdColony is disabled.
-
getZoneType
public int getZoneType()
Used to retrieve the type of zone- Returns:
- one of the zone type constants defined in this class: INTERSTITIAL, NATIVE, or BANNER
-
isValid
public boolean isValid()
Used to retrieve information on whether or not this zone is valid.- Returns:
- whether or not the zone is valid for the app id provided in the configuration.
-
isRewarded
public boolean isRewarded()
Used to retrieve information on whether or not this zone has rewards enabled.- Returns:
- whether or not the zone is rewarded.
-
getPlayFrequency
public int getPlayFrequency()
Used to retrieve the play frequency for this zone (i.e. the number of times theAdColonyInterstitial.show()method must be called to display an interstitial from this zone).- Returns:
- the play frequency for the zone.
-
-