Class VServAds
java.lang.Object
com.codename1.impl.FullScreenAdService
com.codename1.impl.VServAds
The v-serv ad service implements full screen ads
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidRemoves the pending ad data so we can fetch a new adprotected ConnectionRequestCreates a new request for an adprotected booleanfailed()Returns true if the connection failedprotected StringReturns the URL for the adintReturns
Returns
Returns
Returns
protected ComponentComponent representing a given adReturns
protected booleanJust checks if an ad is already fetchedbooleanReturns
voidsetCategory(int category) Parameters
voidsetCountryCode(String countryCode) Parameters
voidParameters
voidsetNetworkCode(String networkCode) Parameters
voidParameters
Methods inherited from class FullScreenAdService
bindTransitionAd, getAdDisplayTime, getTimeout, isAllowWithoutNetwork, isScaleMode, setAdDisplayTime, setAllowSkipping, setAllowWithoutNetwork, setScaleMode, setTimeout, showWelcomeAd
-
Field Details
-
CAT_ID_ACTION_ADVENTURE
public static final int CAT_ID_ACTION_ADVENTURE- See Also:
-
CAT_ID_SPORTS
public static final int CAT_ID_SPORTS- See Also:
-
CAT_ID_MOVIES
public static final int CAT_ID_MOVIES- See Also:
-
CAT_ID_KIDS
public static final int CAT_ID_KIDS- See Also:
-
CAT_ID_RACING
public static final int CAT_ID_RACING- See Also:
-
CAT_ID_ARCADE
public static final int CAT_ID_ARCADE- See Also:
-
CAT_ID_ADULT
public static final int CAT_ID_ADULT- See Also:
-
CAT_ID_STRATEGY
public static final int CAT_ID_STRATEGY- See Also:
-
CAT_ID_TRAVEL
public static final int CAT_ID_TRAVEL- See Also:
-
CAT_ID_EDUCATION
public static final int CAT_ID_EDUCATION- See Also:
-
CAT_ID_PRODUCTIVITY
public static final int CAT_ID_PRODUCTIVITY- See Also:
-
CAT_ID_ENTERTAINMENT
public static final int CAT_ID_ENTERTAINMENT- See Also:
-
CAT_ID_MULTIMEDIA
public static final int CAT_ID_MULTIMEDIA- See Also:
-
CAT_ID_SPIRITUAL
public static final int CAT_ID_SPIRITUAL- See Also:
-
CAT_ID_UTILITY
public static final int CAT_ID_UTILITY- See Also:
-
CAT_ID_SOCIAL_NETWORKING
public static final int CAT_ID_SOCIAL_NETWORKING- See Also:
-
CAT_ID_HEALTH
public static final int CAT_ID_HEALTH- See Also:
-
CAT_ID_OTHERS
public static final int CAT_ID_OTHERS- See Also:
-
-
Constructor Details
-
VServAds
public VServAds()
-
-
Method Details
-
createAdRequest
Creates a new request for an ad
Returns
the network operation
- Specified by:
createAdRequestin classFullScreenAdService
-
hasPendingAd
protected boolean hasPendingAd()Description copied from class:FullScreenAdServiceJust checks if an ad is already fetched
Returns
returns true if an ad is already waiting in the queue
- Specified by:
hasPendingAdin classFullScreenAdService
-
clearPendingAd
protected void clearPendingAd()Removes the pending ad data so we can fetch a new ad- Specified by:
clearPendingAdin classFullScreenAdService
-
getPendingAd
Component representing a given ad
Returns
the ad that is currently pending
- Specified by:
getPendingAdin classFullScreenAdService
-
getAdDestination
Returns the URL for the ad
Returns
the ad URL
- Specified by:
getAdDestinationin classFullScreenAdService
-
failed
protected boolean failed()Returns true if the connection failed- Specified by:
failedin classFullScreenAdService
-
getCountryCode
Returns
the countryCode
-
setCountryCode
Parameters
countryCode: the countryCode to set
-
getNetworkCode
Returns
the networkCode
-
setNetworkCode
Parameters
networkCode: the networkCode to set
-
getLocale
Returns
the locale
-
setLocale
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
Returns
the zoneId
-
setZoneId
Parameters
zoneId: the zoneId to set
-
isAllowSkipping
public boolean isAllowSkipping()Returns
the allowSkipping
- Overrides:
isAllowSkippingin classFullScreenAdService
-