Android

To configure the Player to use Google ads in Android devices, add the following to your KPPlayerConfig:

config.addConfig("doubleClick.plugin", "true");
config.addConfig("doubleClick.adTagUrl", "your ad tag URL");

#Ability to Force IMA SDK to use HLS format to play AD with preferred bitrate (MBit)
config.setAdMimeType(KMediaFormat.hls_clear.mimeType);
config.setAdPreferredBitrate(1000000);

Listening to Ad Events

To listen to ad events, use the following ad events test page.

See this page for a list of commonly used Player ad events.

mPlayer.addKPlayerEventListener("adClick", "some_id", new PlayerViewController.EventListener() {
                @Override
                public void handler(String eventName, String params) {
                    // Do your stuff here..
                }
            });