Class AdColonyZone


  • public class AdColonyZone
    extends java.lang.Object
    Holds all information related to a zone. Can be retrieved at any time via AdColony.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 int BANNER
      1 An integer constant representing a display zone type.
      static int INTERSTITIAL
      0 An integer constant representing an interstitial zone type.
      static int NATIVE
      Deprecated.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getPlayFrequency()
      Used to retrieve the play frequency for this zone (i.e.
      int getRemainingViewsUntilReward()
      Used to retrieve the remaining number of ads that must be watched before a reward is given.
      int getRewardAmount()
      Used to retrieve the reward amount tied to each reward event.
      java.lang.String getRewardName()
      Used to retrieve the name of the reward currency as defined on this zone's page on our dashboard.
      int getViewsPerReward()
      Used to retrieve the number of ad views necessary for a reward.
      java.lang.String getZoneID()
      Used to retrieve the zone id tied to this object.
      int getZoneType()
      Used to retrieve the type of zone
      boolean isRewarded()
      Used to retrieve information on whether or not this zone has rewards enabled.
      boolean isValid()
      Used to retrieve information on whether or not this zone is valid.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 the AdColonyInterstitial.show() method must be called to display an interstitial from this zone).
        Returns:
        the play frequency for the zone.