AdId
- public class AdId implements 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
AdId.EXIT
), and an interstitial you show in app (using, for example in a game,AdId.LEVEL_COMPLETE
).See: Blog post about Ad IDs,
InterstitialBuilder.setAdId(AdId)
andAppBrainBanner.setAdId(AdId)
.- Author
AppBrain
Fields
- public static final AdId ACHIEVEMENTS
For ad units shown around a game’s achievements
- public static final AdId DEFAULT
For ad units that don’t fit any of the other categories
- public static final AdId EXIT
For ad units shown before the user exits your app
- public static final AdId HOME_SCREEN
For ad units shown in the home screen of your app
- public static final AdId LEADERBOARDS
For ad units shown around a game’s leaderboards
- public static final AdId LEVEL_COMPLETE
For ad units shown right after the user has completed a level in your app
- public static final AdId LEVEL_START
For ad units shown at startup of your app
- public static final AdId PAUSE
For ad units shown at natural pauses in your app
- public static final AdId STARTUP
For ad units shown at startup of your app
- public static final AdId STORE
For ads shown around a store or other place where the user can buy in-app products
Methods
- public static AdId custom(String idString)
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()
- public boolean equals(Object o)
- public int hashCode()
- public boolean isBannerId()
- Returns
true if this AdId is suitable to track a banner.
- public boolean isInterstitialId()
- Returns
true if this AdId is suitable to track an interstitial.
- public String toString()