Nov 262009
(via Alessandro) - On Forum Nokia you can find a great new Wiki article: Flash Lite API Bridge Interface. This document explains how to use the services provided by the APIBridge component from Flash Lite applications on Nokia devices. The document describes the API used to access the services provided by the APIBridge and how to set up your Flash Lite applications to make use of the APIBridge.
Flash Lite access the API Bridge via an ActionScript API. This API is modeled after the S60 Platform Services interface model. Except in a few cases, such as the File Upload API, the programming model is similar to the S60 Platform Services model. Below a simple snippet to illustrate the general usage model of the ActionScript API Bridge:
import si.apibridge.*;
//Create a new instance of APIBridge, with callback error function
var bridge:APIBridge = new APIBridge(onBridgeError);
//Create a new service
var myService = bridge.Service("ServiceName", "InterfaceName");
//APIBridge error callback function
function onBridgeError (outParam:Object) {
trace("APIBridge error " + outParam.ErrorCode + " "
+ outParam.ErrorMessage);
}
var param:Object = new Object();
param.property1 = value1;
param.property2 = value2;
...
myService.method(param,onResult);
//Callback called when service method returns a response
function onResult(transactionID:Number, eventID:String,
outParam:Object) {
...
}






Follow me on Twitter





If you enjoyed this article, you might also like...