Languages | Languages |




Brew MP supports C/C++ throughout the API set, Adobe Flash, our TrigML markup language and Lua, a lightweight, general-purpose scripting language with increasing potential as a standalone language in Brew MP. The platform offers APIs that allow an app to talk to the Java Application Manager on the device, as in the unified app manager in the Softkey Application Suite, which manages native Brew, Java and Flash applications.

Flash Action Script

Brew Mobile Platform (Brew MP) ActionScript extensions are installable modules of C/C++ code that extend the ActionScript language to provide additional capabilities and services. Each extension represents a single ActionScript object that has properties and methods like any other ActionScript object. A Brew MP ActionScript extension is a Brew MP class, written in C, that implements the IASExtension interface and provides the implementation for a single ActionScript class object. ActionScript extensions extend the ActionScript language by providing new objects for the ActionScript author to instantiate and use.

Flash Player

Brew MP includes the Adobe Mobile Client (AMC) 1.1 Flash Player, for applications written completely in Flash or in a combination of C/C++ and Flash. The Adobe Flash Lite 3.1 player will also be available as an extension to Brew MP, using the same interfaces supported by the AMC player. The default Flash applet enables apps written in pure Flash (and Flash with ActionScript extensions) to run as Brew MP apps. The AppCreator tool included with Brew MP SDK is integrated with Adobe Flash CS3/CS4 and generates a complete package comprising the MIF, the default applet module, and the SWF file with related resources. Brew MP privilege model applies even to pure Flash applications. AMC 1.1 Player supports Flash 6 content using ActionScript 1.0, and Flash Video with the On2 and Sorensen video codecs. Developers can extend ActionScript to dynamically create bindings to underlying Brew MP functions. The ActionScript extensions are implemented in C/C++ as Brew MP extensions that are loaded by the player at runtime.


The Brew MP SDK includes interfaces and a reference implementation for a unified Application Manager that can interact with a Java AMS and handle both Brew MP and Java applications. The AMS installs (JAD and JAR file verification and signature validation), enumerates, launches and uninstalls MIDP 2.0 Java applications (MIDlets), and handles installation and un-installation notifications to download servers.


Brew MP includes a JSON (Java Script Object Notation) builder/parser, which allows you to build or parse JSON data. JSON is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript programming language for representing simple data structures and associative arrays called objects, but is a language-independent data format. The JSON format is often used for serializing and transmitting structured data over a network connection.


Lua is a fast, lightweight, embeddable scripting language often used in gaming, and applicable to resource-constrained mobile devices. In addition to the Trig environment, the open-source Lua 5.1 Virtual Machine is also available in the C/C++ environment, so it is possible to write an app that runs in Lua VM and behaves as it would in a desktop environment. The Brew MP API into Lua VM follows as closely as possible the standard open-source C API from the standards group that manages Lua. More and more, as we develop IDL interfaces in Brew MP, developers can access platform APIs directly from the Lua environment just by including the Lua bindings in the app. They can also develop a class or service completely in Lua. If an interface in that class is exposed in IDL, then it is easy to access from C/C++; for interfaces not available in IDL, it is still possible to access them from a Lua script using an actor or ActionScript extension to implement a Lua library extension in C code. We think this will become a more powerful programming model and scripting language in Brew MP, even to eventually scripting entire applications in Lua, building native UI applications entirely with Lua scripts rather than C code for close to native performance.


Trigs are UI applications developed using the Trig Markup Language (TrigML), Lua script and Actors written in C/C++. AppCreator provides the studio framework for developing and debugging trigs, and the TrigPlayer, built on UI Widgets, is the rendering engine that executes trig applications. By integrating Lua script to Trigs, developers can directly call IDL-defined Brew MP API's from scripts, perform UI layout logic, and use timers and manipulate attributes to create animation effects. Brew MP routes touch events (pointer up, down, move, and stale move) to TrigML elements for processing in TrigML or Lua scripts that update attributes or manipulate the DOM to achieve the desired response.