Giter Club home page Giter Club logo

samcodes-chartboost's Introduction

Haxe Chartboost

Travis Build Status License

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

Features

Supports:

  • Static and video interstitials.
  • Rewarded videos.
  • Ad caching and custom ad locations.
  • Customizable listener for reacting to all SDK events.
  • GDPR personal data consent method bindings.

Doesn't support:

  • Chartboost InPlay type ads.
  • Chartboost Analytics.
  • iOS banner ads.
  • Age gates.

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

  • Refer to the official Chartboost documentation.
  • Use #if (android || ios) conditionals around your imports and calls to this library for cross platform projects - there is no stub/fallback implementation included in the haxelib.
  • You may need to edit the build.gradle file in order to select working combinations of the Android support library and Play Services, depending on your targeted SDK versions and other libraries used in your project.
  • If you need to rebuild the iOS or simulator ndlls, navigate to /project and run rebuild_ndlls.sh.
  • Got an idea or suggestion? Open an issue on GitHub, or send Sam a message on Twitter.

samcodes-chartboost's People

Contributors

traviscibot avatar tw1ddle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.