Chartboost, Facebook and AdMob

File: JVE.ChartBoost.pas   Inheritance: TComponent ⬅ TJVEChartBoost

File: JVE.AdMob.pas          Inheritance: TComponent ⬅ TJVEAdMobInterstitial

File: JVE.Facebook.pas     Inheritance: TComponent ⬅ TJVEFacebookInterstitial

These components provide interfaces for Chartboost, Facebook Audience Network and AdMob SDKs for presenting interstitial or full screen ads within a mobile application.

To present Chartboost ads you will need to register at https://www.chartboost.com.

To present AdMob ads you will need to register at http://www.admob.com.

To present Facebook ads, register at https://www.facebook.com/audiencenetwork.

Each of the platforms above requires you to separately register the app, for each supported platform (currently this suite only support iOS and Android for advertising) and each provides one or two IDs for the app.

The platform is specified in a prefix “iOS” or “Android” of the name of the property (except for AdMob, which requires separate keys for cell and tablet). The properties thus defined are:

jveadschart

The list of properties, exposed by each component, is:

jveads
Additional properties are available only for some of the networks. AdMob allows you to provide optional user information (providing these values might improve the quality of ads, effectively resulting in a higher level of revenues), as follows:
  • UserGender – if (expected) gender of the user is known, set it here.
  • UserAgeYears – if the (expected) age of the user is known, use this property to set it.
  • UserKeywords – list any known user’s interests in this property.
  • UserLocation – if the current location of the user is known, it can be provided in this public (not published) property.
  • COPPACompliance – indicates that the SDK should be compliant with COPPA act.
Chartboost and AdMob have the following property and accompanying event:
  • Reward – indicates that Reward Video should be presented instead of a regular interstitial.
  • OnReward – event, indicating that the user watched the video and is eligible for reward.
Chartboost is also the only one of the components, which is not a singleton. You can have multiple components, caching and presenting different ads. The component name is used as the location property (see Chartboost site for details).
Some further events are available for some of the interstitial networks, which are not mandatory for implementation.

 

The following methods are exposed by all the components:

  • Cache – caches the ad from the servers into the device.
  • IsCached – returns True if the ad was successfully cached.
  • Show – presents the ad. If the ad was cached, presents it immediately, otherwise caches it and presents it. If there are no ads currently available – does nothing.

See Interstitials support section below for more use cases for these components.

It should be noted that these components are only available in mobile applications (since the underlying SDKs are only available there), so these components do nothing on other platforms (Cache and Show perform no action, while IsCached always returns False).

jveads2