| developer.brewmp.com developer.brewmp.com

Developer

Display Technology Guide

UI: Display Technology Guide for Manufacturersfor Developers

Base version:

Brew MP 1.0

The Brew® Mobile Platform (Brew MP) display system provides access to the display, including support for:

  • Multiple displays
  • Multiple color depths
  • Drawing to the display
  • Updating the display
  • Setting color and font

The display system is part of the UI area of the Brew MP architecture, as shown in the following figure:

The Display Technology Guide describes the display interfaces and how the interfaces interact to provide display services, provides example code showing how an application draws to and updates the display, and provides display configuration information.

Battery Technology Guide

Battery Technology Guide for Manufacturersfor Developers

Describes how an application manages the battery on a mobile device.

Base version:

1.0

Tested version:

1.0

Phone tested:

No

This document explains why it is so important to manage power carefully on a mobile device. The guide then introduces the IBatteryNotifier class, which applications can register with to receive notifications of events, and the IBattery interface, which gets information about the current state of the battery. Finally, the guide provides sample code for using the IBattery interface in an application.

Documentation resources

For complete details about interfaces (such as IBattery, IModel, and IShell), classes (such as IBatteryNotifier), datatypes, and methods (such as ISHELL_CreateInstance and IBATTERY_QueryInterface) that are available to Brew® MP developers, refer to the Brew Mobile Platform C API Reference, which is available both within the Brew MP Documents folder and on the Brew Mobile Platform Developer website, at: http://developer.brewmp.com/reference/api-all (login required).

For information about creating .mif files refer to the Resource File Markup Reference, which is available both within the Brew MP Documents folder and on the Brew Mobile Platform Developer website, at http://developer.brewmp.com/resources (login required).

The Battery Power Management Technology Guide, which is available on the Brew Mobile Platform Developer website, describes techniques for conserving battery power in Brew MP-enabled mobile devices.

High-level architecture

The battery feature is implemented in the hardware layer of a mobile device. The OEM layer sends backlight-related events to the top-visible Brew MP application, and to background applications that have registered to receive events or notifications.

The battery feature is implemented in the hardware layer of a mobile device. Brew MP sends backlight-related events to the top-visible Brew MP application, and to background applications that have registered to receive events or notifications.

Backlight Technology Guide

Backlight Technology Guide for Manufacturersfor Developers

Base version:

1.0

Tested version:

1.0

Phone tested:

No

This Backlight Management Technology Guide describes managing the backlight feature on a mobile device. The guide includes:

  • Information about the IBacklight interface, which is used to get and set backlight values.
  • A code sample that demonstrates the implementation of a device-specific IBacklight interface.
  • A sample application that sets and displays the backlight level on primary and secondary displays and turns the keypad's backlight on and off .

Classes implementing the IBacklight interface are protected. An application that needs to use IBacklight must explicitly specify a dependency on the corresponding backlight class ID in the application's MIF file.

Documentation resources

MIF files are discussed in the Resource File and Markup Reference, which is available both within the Brew® MP Documents folder and on the Brew Mobile Platform Developer Network website.

Interfaces, classes, datatypes, and methods that are available to Brew MP developers are discussed in the Brew Mobile Platform API Reference, which is available both within the Brew MP Documents folder and on Brew Mobile Platform Developer website, at http://developer.brewmp.com/reference/api-all.

High-level architecture

The backlight feature is implemented in the hardware layer of a mobile device. The OEM layer sends battery-related events (such as a low-power warning) to the top-visible Brew MP application, and to background applications that have registered to receive events or notifications.

The backlight feature is implemented in the hardware layer of a mobile device. Brew MP sends battery-related events (such as a low-power warning) to the top-visible Brew MP application, and to background applications that have registered to receive events or notifications.

Time Services Technology Guide

Brew Mobile Platform (Brew MP) includes the following time services:

  • Secure system clock and user clock
  • Alarms
  • Timers
  • Gregorian date and time operations
  • Time helper functions

The Time Services Technology Guide provides information on each of these services.

File System Technology Guide

File System Technology Guide for Manufacturersfor Developers

Base version:

Brew MP 1.0

Document number:

HT80-VT500-45 Rev. B

HT80-VT500-46 Rev. B

Date published:

July 8, 2011

This technology guide describes the Brew® Mobile Platform (Brew MP) file system, including the following file system interfaces:

  • IFileSystem2: Provides file system functions.
  • IFilePort1: Provides functions to allow access to files and directories.

The following interfaces published in prior BREW versions are deprecated as of Brew MP 1.0.2, but they continue to be supported in Brew MP:

  • IFileMgr: Manipulates files and directories.
  • IFile: Reads and modifies file contents.

Note: It is recommended that the IFileSystem2 and IFilePort1 interfaces be used for new development.

The file system is a fundamental service provided by an operating system. The internal non-removable storage acts as the primary storage medium for the Brew MP file system. The Brew MP file system can be complemented by external storage, such as multimedia memory cards (MMC).

Brew MP requires an internal, nonremovable file system to function. Brew MP uses the device file system as the storage for dynamically-loaded Brew MP applications and modules, preferences, and application content. The Brew MP file system provides the following services used by Brew MP-based applications and OS Services:

  • Creating new files and directories
  • Removing existing files and directories
  • Truncating existing files
  • Performing seek and tell operations on opened files
  • Checking for existence of files or directories in the file system
  • Enumeration of existing files and directories
  • Retrieving file and directory metadata information, such as attributes and creation date
  • Accessing an external memory card (such as SD card)
  • Managing available free and used space for the internal and external storage medium
  • Managing operation restrictions using the file lock functionality
  • Managing security, such as privilege and access restrictions

Sensors Technology Guide

Base version:

Brew MP 1.0
Brew® Mobile Platform includes a generic interface for communicating with sensor driver implementations as a protocol operating over a port connection in serial mode. One or more applications can use this BREW- and native AMSS-compatible API to perform the following operations:
  • Register and de-register client applications
  • Allow one or more client applications to configure the physical sensors to certain requirements; some configurable attributes include sampling rate, data representation, g-range selection, etc.
  • Allow one or more client applications to read data generated by the physical sensors
  • Allow one or more client applications to set up trigger conditions such that sensors data are sent to the application only when certain conditions are met

Sensors

In Brew MP version 1.0, the protocol definition supports the following types of sensor:
  • Accelerometer
  • Temperature sensor
  • Pressure sensor
  • Compass
  • Pedometer (virtual sensor)
  • Gyroscope

Protocol

Sensors rely on a protocol for messages (data) exchanged between the sensor applications and the underlying layers. These simple command/response messages take the form of ASCII strings transmitted as part of the IPort1 interface, which developers can implement to access sensor data. A utility interface, ISensorUtil, allows the construction of request messages and parsing of response messages.

The protocol and interfaces provide for one-shot and auto-generated (repeated) data from sensors. They also support conditional data generation, in which the app will receive data from the sensor only when specified conditions are met.

A separate document, Sensors Messaging Protocol (80-VF213-1), describes the syntax and semantics of the messages exchanged between applications and sensor hardware.

Driver

AMSS-level code in the chipset communicates with the sensor hardware through a device driver. AMSS contains default drivers for common sensor types, and OEMs who require support for additional sensors must write their own driver.

The Sensors Driver Application Note (80-VM688-1) contains information about the sensors driver software structure and its interface with the sensors software.

Window Manager Technology Guide

UI: Window Manager Technology Guide for Manufacturers for Developers

Base version:

Brew MP 1.0.4

Document number:

HT80-VT500-106 Rev. C

HT80-VT500-107 Rev. C

Date published:

January 5, 2012

Note: The windowing system and Window Manager are deprecated in Brew ® Mobile Platform (Brew MP™) 1.0.4.

The Window Manager Technology Guide provides information on:

  • The windowing system
  • Window Manager
  • Windows, window classes, and window properties
  • Creating an application that uses windows
  • Creating and using annunciator windows

USB Technology Guide

USB Technology Guide for Manufacturersfor Developers

Base version:

Brew MP 1.0 SDK

Brew® MP's USB interfaces enable applications to connect to external devices through the handset's USB port. Functionality includes:

  • reconfiguring a USB device to enumerate as any USB device
  • implementing multiple USB interfaces and aggregating them into a composite USB device
  • sending and receiving data over USB endpoints
  • querying information about the USB capabilities supported by the device (e.g., high-speed, USB On-the-Go, etc.)
  • querying the state of the USB connection and registering for notification of changes

The main benefit to the developer is that these interfaces allow reconfiguration of USB devices.

Memory and Heap Technology Guide

Memory and Heap Technology Guide for Manufacturers for Developers

Base Brew MP version:

Brew MP 1.0.2

Sample app tested Brew MP version:

Brew MP 1.0.2

Sample app phone tested:

Yes

Base application Version

1.0.3

Document number

HT80-VT500-65 Rev B

HT80-VT500-66 Rev B

Date published:

May 21, 2012

The pool of memory available for dynamic allocation by applications in Brew ® Mobile Platform (Brew MP™) is known as the heap. This guide covers the following heap memory topics:

  • Memory architecture
  • Interfaces and functions used to allocate heap memory
  • Using the heap, including managing fragmentation and code samples
  • Integration with the device

OS Services Technology Guide

OS Services Technology Guide for Manufacturers for Developers

Base version:

Brew MP 1.0

Document number:

HT80-VT500-69 Rev. C

HT80-VT500-68 Rev. B

Date published:

April 23, 2012

The OS Services Technology Guide provides:

  • An overview of OS Services (formerly Component Services)
  • Descriptions of the core services functionality, including the related APIs
  • Information on OS Services configuration

OS Services is part of the System area of the Brew ® Mobile Platform (Brew MP) architecture, as shown in the following figure:

Pages

Subscribe to developer.brewmp.com RSS