Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

HangIt Native Extension for Adobe AIR Developer Guide


This Native Extension allows you to use the HangIt SDK in Adobe AIR mobile applications.

A complete sample class demonstrating the functions of the ActionScript API is available in the /example folder.

Refer to the ActionScript HTML class documentation (/asdoc) for specific details on the API's ActionScript methods and classes.

Include the HangIt library

Before you begin: This extension requires Adobe AIR 21.0 or higher. You can get the latest AIR SDK from here.

In Flash Professional:

  1. Create a new project of the type AIR for iOS (Or Android).
  2. Select File > Publish Settings.
  3. Select the wrench icon next to Script for ActionScript Settings.
  4. Select the Library Path tab.
  5. Press the Browse for Native Extension (ANE) File button and select the com.hangit.extensions.HangIt.ane file.
  6. (For Android Only) Press the Browse for Native Extension (ANE) File button again, and select the com.hangit.extensions.GoogleServices.ane file.

In Flash Builder 4.6 or Later:

  1. Go to Project Properties (right-click your project in Package Explorer and select Properties).
  2. Select ActionScript Build Path and click the Native Extensions tab.
  3. Click Add ANE and navigate to the com.hangit.extensions.HangIt.ane file.
  4. (For Android Only) Click Add ANE and navigate to the com.hangit.extensions.GoogleServices.ane file.
  5. Add the extension to the build target before compiling.
  6. (Ensure the 'package' checkbox is selected for the extensions in the target build properties.)

Update your Application Descriptor

For All Project Targets

To use the extension for either iOS or Android, add the extension identifier for HangIt and to the <extensions> block in application.xml. If targeting Android, a GoogleServices.ane is also required:


For Projects Targeting iOS

To use the extension for iOS, you'll need to include the NSAppTransportSecurity data show below into your Application Descriptor's <InfoAdditions> block inside the <iPhone> block, set the MinimumOSVersion to 8.0, and include the required UIBackgroundModes and NSLocationWhenInUseUsageDescription and NSLocationAlwaysUsageDescription values:




<string>We offer great deals at places near you, so let us know where you are. We’ll never spam you.</string>
<string>We offer great deals at places near you, so let us know where you are. We’ll never spam you.</string>

For Projects Targeting Android

In order to use the HangIt Extension on Android, you'll need to update the manifestAdditions block in your your application.xml file (for convenience, it may easier to copy and paste this section from the example/app.xml file included with the HangIt extension):

		<manifest android:installLocation="auto">

			<!-- These permissions are required by HangIt -->
			<uses-permission android:name="android.permission.INTERNET" />
			<uses-permission android:name="android.permission.READ_PHONE_STATE" />
			<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
			<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
			<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
			<uses-permission android:name="" />
			<uses-permission android:name="" />
			<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />


			<meta-data android:name="" android:value="@integer/google_play_services_version" />

   <service android:name="">
        <meta-data android:name="" android:value="ic_launcher"/>
        <meta-data android:name="" android:value=""/>
        <meta-data android:name="" android:value=""/>
        <meta-data android:name="" android:value=""/>
    <service android:name=""/>
    <service android:name=""/>
    <receiver android:name="">
            <action android:name="android.intent.action.BOOT_COMPLETED"/>
            <action android:name="android.intent.action.QUICKBOOT_POWERON"/>

    <activity android:name=""/>
    <activity android:name="" android:screenOrientation="portrait"/>
    <activity android:name="" android:screenOrientation="portrait"/>
    <activity android:name=""/>
    <activity android:name="" android:screenOrientation="portrait"/>
    <activity android:name="" android:screenOrientation="portrait"/>

    <!--meta-data android:name="" android:value="AIzaSyA6anZrDFdlkwkWN41s73rYnzB-INSIgD0"/-->

    <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:name="" android:theme="@android:style/Theme.Translucent"/>
    <activity android:name="" android:theme="@style/Theme.IAPTheme"/>

    <meta-data android:name="" android:value="true"/>
    <receiver android:exported="false" android:name="">
            <action android:name=""/>
    <service android:exported="false" android:name="com.estimote.sdk.service.BeaconService"/>


ActionScript Integration

To activate HangIt in your project, you include a few simple function calls:

Initialize the HangIt API

Import the API Packages at the top of any source files that reference HangIt:

import com.hangit.nativeextensions.*;

Your will need to create an account and login to to create an app and generate your App ID Key set below, depending on the target platforms of your project. Create a HangItConfig object that contains these values:

	var config:HangItConfig=new HangItConfig()
		.setAndroidKey("your android key goes here")
		.setiOSKey("your ios key goes here");

At the very start of your application's execution, initialize the HangIt API by calling HangIt.create(config), followed by HangIt.hangIt.startAllServices(). You should call this in either your Document Class constructor function, or on 'frame 1' if you are using legacy timeline style Flash code.

You may use the HangIt.isSupported() function to determine if the platform your app is running on supports the HangIt API (either Android or iOS):

	trace("hangit works on iOS And Android only.");

Opening the Wallet

If your application needs to open the HangIt wallet, call the openWallet() method at any time after initialization:

// open wallet

Clearing the Device

During testing, you may need to clear the device in order to test a location based notification or offer a second time. This is done with the clearDevice() function:

	// clear device to test location based notifications again


HangitSDK Adobe Air Plugin



No releases published
You can’t perform that action at this time.