Class AdId
java.lang.Object
com.appbrain.AdId
- All Implemented Interfaces:
Serializable
Class for identifying ad units. Setting an AdId will allow you to track individual ads. For
example, you can distinguish between an interstitial you show on app exit (using EXIT), and an interstitial you show in app (using, for example in a game, LEVEL_COMPLETE).
See: Blog post about Ad IDs, InterstitialBuilder.setAdId(AdId) and AppBrainBanner.setAdId(AdId).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AdIdFor ad units shown around a game's achievementsstatic final AdIdFor ad units that don't fit any of the other categoriesstatic final AdIdFor ad units shown before the user exits your appstatic final AdIdFor ad units shown in the home screen of your appstatic final AdIdFor ad units shown around a game's leaderboardsstatic final AdIdFor ad units shown right after the user has completed a level in your appstatic final AdIdFor ad units shown at startup of your appstatic final AdIdFor ad units shown at natural pauses in your appstatic final AdIdFor ad units shown at startup of your appstatic final AdIdFor ads shown around a store or other place where the user can buy in-app products -
Method Summary
Modifier and TypeMethodDescriptionstatic AdIdIf you don't want to use one of the built-in AdId constants, you can generate custom ad ids on the AppBrain developer dashboard (click on one of your apps, then Ad Settings).booleanintgetIndex()inthashCode()booleanbooleanstatic AdIdtoString()
-
Field Details
-
DEFAULT
For ad units that don't fit any of the other categories -
HOME_SCREEN
For ad units shown in the home screen of your app -
STARTUP
For ad units shown at startup of your app -
PAUSE
For ad units shown at natural pauses in your app -
EXIT
For ad units shown before the user exits your app -
LEVEL_START
For ad units shown at startup of your app -
LEVEL_COMPLETE
For ad units shown right after the user has completed a level in your app -
ACHIEVEMENTS
For ad units shown around a game's achievements -
LEADERBOARDS
For ad units shown around a game's leaderboards -
STORE
For ads shown around a store or other place where the user can buy in-app products
-
-
Method Details
-
custom
If you don't want to use one of the built-in AdId constants, you can generate custom ad ids on the AppBrain developer dashboard (click on one of your apps, then Ad Settings). Pass the ad id string from the developer dashboard to this method to create your AdId instance. For example when showing an interstitial:InterstitialBuilder.create().setAdId(AdId.custom(<"your-id">)).show()
-
parse
-
getIndex
public int getIndex() -
toString
-
isInterstitialId
public boolean isInterstitialId()- Returns:
- true if this AdId is suitable to track an interstitial.
-
isBannerId
public boolean isBannerId()- Returns:
- true if this AdId is suitable to track a banner.
-
equals
-
hashCode
-