Tw1ddle / samcodes-chartboost

:moneybag: Unofficial Chartboost ads support for Haxe/OpenFL Android and iOS targets
https://samcodes.co.uk/code/
MIT License
19 stars 4 forks source link
ads chartboost haxe interstitials

Haxe Chartboost

License

Unofficial Chartboost ads library support for Haxe OpenFL Android and iOS targets. See the demo app here.

Deprecation note. I am not currently using the Chartboost ads haxelib in any games, so this is likely to be out of date.

Features

Supports:

Doesn't support:

If there is something you would like adding please open an issue. Pull requests welcomed too!

Install

haxelib install samcodes-chartboost

Example

See the demo app for a complete example using a custom listener.

Screenshot of demo app

Screenshot of demo app

Usage

Include the haxelib through Project.xml:

<haxelib name="samcodes-chartboost" />

On Android and iOS, pass the app identifier and signature in for your chosen app/platform when initializing Chartboost:

Chartboost.initChartboost(yourAppId, yourAppSignature);
// Basic usage
Chartboost.setListener(new MyChartboostListener(listener)); // Attach your own ChartboostListener subclass to handle/respond to SDK events like 'willDisplayInterstitial', 'didDismissInterstitial' etc.

Chartboost.cacheInterstitial("mylocation"); // Cache an interstitial at 'mylocation'. Locations are added to the Chartboost dashboard automatically.

Chartboost.showInterstitial("mylocation"); // Show an interstitial at 'mylocation'. Will display faster if previously cached (check Chartboost.hasInterstitial()).

// And so on...

Notes