Adobe Air Bridge API (Mapp Cloud)

Initializing the plugin

Construct the AppoxeeANE in your application's constructor.

Use your Appoxee Key & Secret as shown in the application's screen on the Appoxee Dashboard.

SDK Key & Secret - Do Not Mix Platforms!

Make sure the Key & Secret under your iOS Application in the Appoxee Dashboard is used for your iOS Air App.

Make sure the Key & Secret under your Android Application in the Appoxee Dashboard is used for your Android Air App.

Do not mix between them!




Engage
import com.appoxee.AppoxeeANE; ... private var _appoxeeANE:AppoxeeANE; ... public function YourAirApp() { super(); ... _appoxeeANE = new AppoxeeANE(key, secret,handleIncomingPushMessage); } ... private function handleIncomingPushMessage(payload:String):void { trace("Handle Incoming Push Message Called with : "+result); //handle push payload in callback } ...

Push Notification Callback and Extra Fields Parsing

The method handleIncomingPushMessage() id the method that will be called every time a push notification will be received by the device. Further explanation on using the Incoming Push Notification Callback Method can be found in Appoxee Adobe Air - Handling Extra Fields.

 

Alias

Set device alias.

/**
* Set device's alias - a unique identifier tor this device
* @param value alias
* @param func callback function to get result (expected : "true" when the operation is successful , "false" (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function setDeviceAlias(value:String,func:Function):void

 

Example
private function handleSetAliasCallback(result:String):void { //Do something with result (true/false as string) ... function setDeviceAlias(alias:String):void { _appoxeeANE.setDeviceAlias(alias,handleSetAliasCallback); }

 

Get device alias.

/**
* Get device's alias
* @param func callback function to get result (expected : the alias , Empty String (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function getDeviceAlias(func:Function):void

Example
private function getAliasCallback(result:String):void { //Do something with result (the alias itself) } ...  function getAlias():void { _appoxeeANE.getDeviceAlias(getAliasCallback); }

 

Remove Alias

/**
* Remove device's alias
* @param func callback function to get result (expected : "true" when the operation is successful , "false" (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function removeDeviceAlias(func:Function):void

Example

 

Device API 

Device Information

/**
* Get device info, as stored on Appoxee servers
* @param func callback function to get result (expected : json payload as string contains the device's info)
*/
public function getDeviceInformation(func:Function):void

Example



Inbox API

Inbox / In-App messages / Rich Messages API is not supported in Android

 

Rich Messages

 

 

/**
* Get the list of messages [note: not available for Android]
* @param func callback function to get result (expected : json payload as string , representing the rich messages)
*/
public function getRichMessages(func:Function):void

Example



 

Delete Messages

/**
* Delete inbox message [note: not available for Android]
* @param messageID id of the message to delete 
* @param func callback function to get result (expected : "true" when the operation is successful)
*/
public function deleteRichMessage(messageId:int,func:Function):void

Example



 

Refresh Inbox

/**
* Reload inbox messages [note: not available for Android]
* @param func callback function to get result
*/
public function refreshInbox(func:Function):void

Example



 

Disable Inbox

/**
* Enable/disable inbox messages [note: not available for Android]
* @param func callback function to get result (expected : "true" when the operation is successful , "false" (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function setInboxEnabled(value:Boolean,func:Function):void

Example



 

Inbox Enabled

/**
* Return if inbox is enabled on the device [note: not available for Android]
* @return  true/false (is the Inbox Enabled or Disabled)
*/
public function isInboxEnabled():Boolean

Example



Tags API

Remove Tags

/**
* Remove a tag to device, must be one which is listed on app tags (see getApplicationTags())
* @param removeTag tag to add (set false)
* @param func callback function to get result (expected : "true" when the operation is successful , "false" (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function removeTagFromDevice(removeTag:String,func:Function):void

Example



 

Add Tag

/**
* Add a tag to device, must be one which is listed on app tags (see getApplicationTags())
* @param setTag tag to add (set true)
* @param func callback function to get result (expected : "true" when the operation is successful , Empty Result (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function addTagToDevice(setTag:String,func:Function):void

Example





Get Device Tags

/**
* Get device tags - a list current device tags
* @param func callback function to get result (expected : The Device's Tags, when the operation is successful , Empty Result (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function getDeviceTags(func:Function):void

Example



 

Application Tags

/**
* Get application tags - a list of tags supported by your app configuration on dashboard
* @param func callback function to get result (expected : The Application's Tags, when the operation is successful , "false" (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function getApplicationTags(func:Function):void

Example

 

Push API

Push Enabled

/**
* Return if push are enabled on the device
* @return true/false (Is Push Enabled or Disabled)
*/
public function isPushEnabled():Boolean

Example



 

Enable Push

/**
* Enable/disable push messages (soft opt-out)
* @param func callback function to get result (expected : "true" when the operation is successful , "false" (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function setPushEnabled(value:Boolean,func:Function):void

Example

Custom Fields API

Set Date Field

/**
* Set value to a Date custom field 
* @param name custom-field name
* @param value value to set
* @param func callback function to get result (expected : "true" when the operation is successful , "false" (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function setDateCustomField(name:String,value:Date,func:Function):void

Example



 

Set Numeric Filed

/**
* Set a value to a numeric custom field 
* @param name custom-field name
* @param value value to set
* @param func callback function to get result (expected : "true" when the operation is successful , "false" (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function setNumericCustomField(name:String,value:Number,func:Function):void

Example

 

 

Increment Numeric Field

/**
* Incerement a custom numeric field value [note: not available for Android]
* @param name custom-field name
* @param value amount to add
* @param func callback function to get result (expected : "true" when the operation is successful , "false" (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function incNumericCustomField(name:String,value:Number,func:Function):void

Example



 

Set String Field

/**
* Set value to a String custom field 
* @param name custom-field name
* @param value value to set
* @param func callback function to get result (expected : "true" when the operation is successful , "false" (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function setStringCustomField(name:String,value:String,func:Function):void

Example



 

Get Custom Field

/**
* Get custom field value, string representation
* @param name custom-field name
* @param func callback function to get result (expected : the value of the field as string, when the operation is successful , "false" (in Android) or NSError as String (in iOS) if operation has failed)
*/
public function getCustomField(key:String,func:Function):void

Example

 

iOS10 ONLY

Show Foreground Notifications / Get Foreground Notifications state

 

Example