Kidoz Adobe Air Sample App SDK
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

KIDOZ SDK + Sample Application (ANE)

** KIDOZ SDK Android Extension (ANE) compatible with Android 4.2 (API level 17) and above. Sample app is compiled with Flex SDK 20.0 on Flash Builder 4.7**

Updated to KIDOZ Android SDK version Updated to KIDOZ iOS SDK version 0.5.9

Due to new regulation by Google Play Design for Family policy , all references to YouTube were removed from the SDK.

This SDK version supports secured https protocol only and will resolve Google Play Security alert of Webview that is vulnerable to JavaScript interface injection. Note that only secured external and internal events are supported from this version.

API Documentation

This Flex Mobile application project provides an example of the KIDOZ SDK integration for Adobe Air applications.

The example application contains the following creative tools:

Recommended units:

  • KIDOZ Panel view content tool - the PanelView
  • KIDOZ Interstitial/Rewarded view content tool - the InterstitialView/RewardedView

** Note that you need to select either Interstital OR Rewarded during application lifetime.

Removed units:

  • KIDOZ Feed view content tool - the FeedView
  • KIDOZ Flexi Point view content tool - the FlexiView

The sample application KidozSdkSampleApp contains the KidozSdkAir.ane file, which is the Android Native Extension (ANE) for KIDOZ SDK: this file should be downloaded and copied to your project to integrate the KIDOZ SDK.

Running the sample app

  1. Download / Clone the KidozSdkSampleApp
  2. Add it to your Flash® Builder™®
  3. Run the application as a mobile android application (Only Google Android Target platform And On Device Launch method are supported).

KIDOZ SDK - Getting Started

================================= You can read more about the KIDOZ SDK on KIDOZ SDK


In case there is some other .ANE files that already includes the V4 libary (getting errors during build phase) such as (Google Play Service, AdMob or othe libs) then you should NOT include the supportV4Air.ane file to your project only the KidozFlexSdkLib.ane.

Include the library Copy KidozFlexSdkLib.ane and the supportV4Air.ane files from SampleApplication to YOUR project.

  1. Right click on the project and select Properties.
  2. In opened window select Flex Build Path and then click Native Extensions. (Figure 1).
  3. Click (Add ANE) and select KidozFlexSdkLib.ane file and the supportV4Air.ane file.
  4. Select Flex Build Packaging and then click Native Extensions and check the empty box of recently added ANE. (Figure 2).
  5. Add to compiler arguments -swf-version that is adjusted to currently used Air SDK. For Air SDK version 19.0 set -swf-version 30 (Figure 3)

Example for adding only the KIDOZ SDK ane

App Manifest Definitions: ..-app.xml (IMPORTANT) For correct flow of the SDK add the following lines in the <android> section of your ..-app.xml file (Application definition xml file) located in the root of the src folder of you project.

	<manifest android:installLocation="auto">		
	        <uses-permission android:name="android.permission.INTERNET"/>				    
	        <application android:hardwareAccelerated="true">		
			<activity android:name="com.kidoz.sdk.api.ui_views.interstitial.KidozAdActivity"
		        <receiver android:name="com.kidoz.sdk.api.receivers.SdkReceiver" >
		                <action android:name="android.intent.action.PACKAGE_ADDED" />		
		                <data android:scheme="package" />


Initializing the SDK

SDK should be initialized only once. When initializing the SDK, please make sure to use your given publisherID and securityToken, which can be retrieved by contacting

Initiate SDK by creating SdkControler instance

 	/** Initiate Kidoz SDK by creating an SdkControler instance
	 * @throws RuntimeException in case of invalid or missing publisher_id or security token
	 *  */
	static var controller:SdkController = SdkController.initSdkContoller("5","i0tnrdwdtq0dm36cqcpg6uyuwupkj76s");



You can now register to be notified of successfuly sdk init event. If a problem occured during init an error event would fire.

Setting the listeners

	controller.setSDKInitListener(new SDKInitListener(controller));	

SDKInitListener is just an object that implements the ISDKInitIntefrace interface. It's events:

		/** On SDK Init Success callback */
		public function onInitSuccess():void {		
		/** On SDK Init Error callback */
		public function onInitError():void {


PanelView is a customized special view that can slide in/out of the screen (both in horizontal and vertical layout) with minimal interference to user experience. The PanelView can be placed on one of four sides of the activity screen - PANEL_TYPE.TOP,PANEL_TYPE.BOTTOM

The `PanelView` can be controlled via a special `Handle` button that can be located in any of the 3 following positions - `HANDLE_POSITION.START`,`HANDLE_POSITION.CENTER`,`HANDLE_POSITION.END` depending on the `PanelView` initial screen location.

To add the Panel to your view use:

     /** Add Panel to View  */
  • You can change the color of the Panel on runtime by using:
  • To invoke PanelView programmatically use:
     * Expand panel view programmatically


     * Collapse panel view programmatically
  • To check the PanelView current view state use:
     * Check if panel expanded or colapssed

You can implement IPanelViewInterface interface if you want to be informed when the PanelView is Collapsed/Expanded by creating a class that implements the interface.

 	import com.kidoz.sdk.api.platforms.IPanelViewInterface;
	import com.kidoz.sdk.api.platforms.SdkController;
	/** Example Implementation of the Panel View events listener  */
	public class PanelViewActionListener implements IPanelViewInterface
		var mController:SdkController;
		public function PanelViewActionListener(controller:SdkController)
			mController = controller;
		/** On Panel view expanded callback */
		public function onPanelViewExpanded():void {
			mController.printToastDebugLog("Feed Panel Expanded");
		/** On Panel view collapsed callback */
		public function onPanelViewCollapsed():void {
			mController.printToastDebugLog("Feed Panel Collapsed");
		/** On Panel view ready callback */
		public function onPanelViewReady():void {
			mController.printToastDebugLog("Feed Panel Ready");
  • Set interface by:
	 * Set Panel View events listener
	 * Used to catch panel view events (Expand/Collaps)
	 *  */
	controller.setOnPanelViewEventListener(new PanelViewActionListener(controller));

KIDOZ Interstitial / Rewarded

Request interstitial ad

	import com.kidoz.sdk.api.platforms.SdkController; 

Request rewarded ad

	import com.kidoz.sdk.api.platforms.SdkController; 

Showing the interstitial / rewarded ad

After receiving the interstitial reay event it is possible to call the show function

	/** Show kidoz feed view */

Setting the listeners

 	controller.setOnInterstitialEventListener(new InterstitialViewActionListener(controller));
	controller.setOnRewardedEventListener(new RewardedViewActionListener(controller));	

Interstitial Listener:

import com.kidoz.sdk.api.platforms.IInterstitialEventInterface;
public function InterstitialViewActionListener(controller:SdkController)
		/** On intersitial view expanded callback */
		public function onClosed():void {
		/** On intersitial view collapsed callback */
		public function onOpened():void {
		/** On intersitial view collapsed callback */
		public function onReady():void {
		/** On interstitial fail callback */
		public function onLoadFailed():void {
		/** On Interstitial no offers callback */
		public function onInterstitialNoOffers():void {

Rewarded Listener:

import com.kidoz.sdk.api.platforms.IRewardedEventInterface;
public function InterstitialViewActionListener(controller:SdkController)
/** On Rewarded view expanded callback */
		public function onClosed():void {
		/** On Rewarded view collapsed callback */
		public function onOpened():void {
		/** On Rewarded view collapsed callback */
		public function onReady():void {
		/** On Rewarded fail callback */
		public function onLoadFailed():void {

		/** On rewarded callback */
		public function onRewarded():void {
		/** On rewarded movie started callback */
		public function onRewardedVideoStarted():void {
		/** On Rewarded no offers callback */
		public function onRewardedNoOffers():void {

For any question or assistance, please contact us at


Copyright 2015 KIDOZ, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.