# Class VServAds

java.lang.Object
com.codename1.impl.FullScreenAdService
com.codename1.impl.VServAds

public class VServAds extends FullScreenAdService
The v-serv ad service implements full screen ads

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CAT_ID_ACTION_ADVENTURE`
  `static final int`
  `CAT_ID_ADULT`
  `static final int`
  `CAT_ID_ARCADE`
  `static final int`
  `CAT_ID_EDUCATION`
  `static final int`
  `CAT_ID_ENTERTAINMENT`
  `static final int`
  `CAT_ID_HEALTH`
  `static final int`
  `CAT_ID_KIDS`
  `static final int`
  `CAT_ID_MOVIES`
  `static final int`
  `CAT_ID_MULTIMEDIA`
  `static final int`
  `CAT_ID_OTHERS`
  `static final int`
  `CAT_ID_PRODUCTIVITY`
  `static final int`
  `CAT_ID_RACING`
  `static final int`
  `CAT_ID_SOCIAL_NETWORKING`
  `static final int`
  `CAT_ID_SPIRITUAL`
  `static final int`
  `CAT_ID_SPORTS`
  `static final int`
  `CAT_ID_STRATEGY`
  `static final int`
  `CAT_ID_TRAVEL`
  `static final int`
  `CAT_ID_UTILITY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VServAds()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `clearPendingAd()`
  Removes the pending ad data so we can fetch a new ad
  `protected ConnectionRequest`
  `createAdRequest()`
  Creates a new request for an ad
  `protected boolean`
  `failed()`
  Returns true if the connection failed
  `protected String`
  `getAdDestination()`
  Returns the URL for the ad
  `int`
  `getCategory()`

  ###### Returns

  `String`
  `getCountryCode()`

  ###### Returns

  `String`
  `getLocale()`

  ###### Returns

  `String`
  `getNetworkCode()`

  ###### Returns

  `protected Component`
  `getPendingAd()`
  Component representing a given ad
  `String`
  `getZoneId()`

  ###### Returns

  `protected boolean`
  `hasPendingAd()`
  Just checks if an ad is already fetched
  `boolean`
  `isAllowSkipping()`

  ###### Returns

  `void`
  `setCategory(int category)`

  ###### Parameters

  `void`
  `setCountryCode(String countryCode)`

  ###### Parameters

  `void`
  `setLocale(String locale)`

  ###### Parameters

  `void`
  `setNetworkCode(String networkCode)`

  ###### Parameters

  `void`
  `setZoneId(String zoneId)`

  ###### Parameters

  ### Methods inherited from class FullScreenAdService

  `bindTransitionAd, getAdDisplayTime, getTimeout, isAllowWithoutNetwork, isScaleMode, setAdDisplayTime, setAllowSkipping, setAllowWithoutNetwork, setScaleMode, setTimeout, showWelcomeAd`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### CAT_ID_ACTION_ADVENTURE

    public static final int CAT_ID_ACTION_ADVENTURE
    See Also:
      - Constant Field Values

  - ### CAT_ID_SPORTS

    public static final int CAT_ID_SPORTS
    See Also:
      - Constant Field Values

  - ### CAT_ID_MOVIES

    public static final int CAT_ID_MOVIES
    See Also:
      - Constant Field Values

  - ### CAT_ID_KIDS

    public static final int CAT_ID_KIDS
    See Also:
      - Constant Field Values

  - ### CAT_ID_RACING

    public static final int CAT_ID_RACING
    See Also:
      - Constant Field Values

  - ### CAT_ID_ARCADE

    public static final int CAT_ID_ARCADE
    See Also:
      - Constant Field Values

  - ### CAT_ID_ADULT

    public static final int CAT_ID_ADULT
    See Also:
      - Constant Field Values

  - ### CAT_ID_STRATEGY

    public static final int CAT_ID_STRATEGY
    See Also:
      - Constant Field Values

  - ### CAT_ID_TRAVEL

    public static final int CAT_ID_TRAVEL
    See Also:
      - Constant Field Values

  - ### CAT_ID_EDUCATION

    public static final int CAT_ID_EDUCATION
    See Also:
      - Constant Field Values

  - ### CAT_ID_PRODUCTIVITY

    public static final int CAT_ID_PRODUCTIVITY
    See Also:
      - Constant Field Values

  - ### CAT_ID_ENTERTAINMENT

    public static final int CAT_ID_ENTERTAINMENT
    See Also:
      - Constant Field Values

  - ### CAT_ID_MULTIMEDIA

    public static final int CAT_ID_MULTIMEDIA
    See Also:
      - Constant Field Values

  - ### CAT_ID_SPIRITUAL

    public static final int CAT_ID_SPIRITUAL
    See Also:
      - Constant Field Values

  - ### CAT_ID_UTILITY

    public static final int CAT_ID_UTILITY
    See Also:
      - Constant Field Values

  - ### CAT_ID_SOCIAL_NETWORKING

    public static final int CAT_ID_SOCIAL_NETWORKING
    See Also:
      - Constant Field Values

  - ### CAT_ID_HEALTH

    public static final int CAT_ID_HEALTH
    See Also:
      - Constant Field Values

  - ### CAT_ID_OTHERS

    public static final int CAT_ID_OTHERS
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### VServAds

    public VServAds()

- ## Method Details

  - ### createAdRequest

    protected ConnectionRequest createAdRequest()

    Creates a new request for an ad

    ###### Returns

    the network operation

    Specified by:
      `createAdRequest` in class `FullScreenAdService`

  - ### hasPendingAd

    protected boolean hasPendingAd()
    Description copied from class: `FullScreenAdService`

    Just checks if an ad is already fetched

    ###### Returns

    returns true if an ad is already waiting in the queue

    Specified by:
      `hasPendingAd` in class `FullScreenAdService`

  - ### clearPendingAd

    protected void clearPendingAd()
    Removes the pending ad data so we can fetch a new ad
    Specified by:
      `clearPendingAd` in class `FullScreenAdService`

  - ### getPendingAd

    protected Component getPendingAd()

    Component representing a given ad

    ###### Returns

    the ad that is currently pending

    Specified by:
      `getPendingAd` in class `FullScreenAdService`

  - ### getAdDestination

    protected String getAdDestination()

    Returns the URL for the ad

    ###### Returns

    the ad URL

    Specified by:
      `getAdDestination` in class `FullScreenAdService`

  - ### failed

    protected boolean failed()
    Returns true if the connection failed
    Specified by:
      `failed` in class `FullScreenAdService`

  - ### getCountryCode

    public String getCountryCode()

    ###### Returns

    the countryCode

  - ### setCountryCode

    public void setCountryCode(String countryCode)

    ###### Parameters

    - `countryCode`: the countryCode to set

  - ### getNetworkCode

    public String getNetworkCode()

    ###### Returns

    the networkCode

  - ### setNetworkCode

    public void setNetworkCode(String networkCode)

    ###### Parameters

    - `networkCode`: the networkCode to set

  - ### getLocale

    public String getLocale()

    ###### Returns

    the locale

  - ### setLocale

    public void setLocale(String locale)

    ###### Parameters

    - `locale`: the locale to set

  - ### getCategory

    public int getCategory()

    ###### Returns

    the category

  - ### setCategory

    public void setCategory(int category)

    ###### Parameters

    - `category`: the category to set

  - ### getZoneId

    public String getZoneId()

    ###### Returns

    the zoneId

  - ### setZoneId

    public void setZoneId(String zoneId)

    ###### Parameters

    - `zoneId`: the zoneId to set

  - ### isAllowSkipping

    public boolean isAllowSkipping()

    ###### Returns

    the allowSkipping

    Overrides:
      `isAllowSkipping` in class `FullScreenAdService`