net.rim.device.api.system
Interface SystemListener2

All Superinterfaces:
SystemListener

public interface SystemListener2
extends SystemListener

The listener interface for receiving system events.

Since:
BlackBerry API 4.1.0

Field Summary
static int POWER_OFF_KEY_PRESSED
           
static int USB_STATE_CABLE_CONNECTED
          USB cable now connected to device.
static int USB_STATE_CABLE_DISCONNECTED
          USB cable now disconnected from device.
static int USB_STATE_ENUMERATED
          USB device now enumerated.
static int USB_STATE_MS_INTERFACE_ENUMERATED
          USB device now has USB Mass Storage enumerated.
static int USB_STATE_MTP_INTERFACE_ENUMERATED
          USB device now has USB Media Transfer Protocol (MTP) enumerated.
static int USB_STATE_NOT_ENUMERATED
          USB device received a USB_RESET (it is not enumerated).
 
Method Summary
 void backlightStateChange(boolean on)
          Invoked when the backlight state changes.
 void cradleMismatch(boolean mismatch)
          Invoked when a USB device has been placed in a serial cradle.
 void fastReset()
          Invoked when a fast reset occurs.
 void powerOffRequested(int reason)
          Invoked when the OS requests that the device power be turned off.
 void usbConnectionStateChange(int state)
          Invoked when the USB connection state changes.
 
Methods inherited from interface net.rim.device.api.system.SystemListener
batteryGood, batteryLow, batteryStatusChange, powerOff, powerUp
 



Field Detail

POWER_OFF_KEY_PRESSED

static final int POWER_OFF_KEY_PRESSED
See Also:
Constant Field Values
Since:
BlackBerry API 4.1.0

USB_STATE_CABLE_CONNECTED

static final int USB_STATE_CABLE_CONNECTED
USB cable now connected to device.

The device detects that it is now connected to some kind of host or AC adaptor. At this point, the device doesn't know what it's connected to (at this point, the MUX is still off).

See Also:
Constant Field Values
Since:
BlackBerry API 4.1.0

USB_STATE_CABLE_DISCONNECTED

static final int USB_STATE_CABLE_DISCONNECTED
USB cable now disconnected from device.

The device has now been taken off the cable, and thus isn't enumerated anymore (and the MUX has been turned off).

See Also:
Constant Field Values
Since:
BlackBerry API 4.1.0

USB_STATE_ENUMERATED

static final int USB_STATE_ENUMERATED
USB device now enumerated.

After being connected to a cable, the device now knows it's connected to a USB host, and currently enumerated as a RIM handheld on that host (at this point, the MUX has been turned on).

See Also:
Constant Field Values
Since:
BlackBerry API 4.1.0

USB_STATE_NOT_ENUMERATED

static final int USB_STATE_NOT_ENUMERATED
USB device received a USB_RESET (it is not enumerated).

After receiving a USB_RESET, the device is no longer enumerated.

See Also:
Constant Field Values
Since:
BlackBerry API 4.1.0

USB_STATE_MS_INTERFACE_ENUMERATED

static final int USB_STATE_MS_INTERFACE_ENUMERATED
USB device now has USB Mass Storage enumerated.

After being connected to a cable, the device now knows it's connected to a USB host, and currently enumerated as a Mass Storage Device on that host (this flag is only valid if USB_ENUMERATED is also set)

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

USB_STATE_MTP_INTERFACE_ENUMERATED

static final int USB_STATE_MTP_INTERFACE_ENUMERATED
USB device now has USB Media Transfer Protocol (MTP) enumerated.

After being connected to a cable, the device now knows it's connected to a USB host, and currently enumerated as an MTP on that host (this flag is only valid if USB_ENUMERATED is also set)

See Also:
Constant Field Values
Since:
BlackBerry API 4.7.0


Method Detail

powerOffRequested

void powerOffRequested(int reason)
Invoked when the OS requests that the device power be turned off.

Parameters:
reason - POWER_OFF_KEY_PRESSED
Since:
BlackBerry API 4.1.0

cradleMismatch

void cradleMismatch(boolean mismatch)
Invoked when a USB device has been placed in a serial cradle.

Parameters:
mismatch - Will be true when the device and cradle don't match and false when the device is removed from the wrong cradle.
Since:
BlackBerry API 4.1.0

fastReset

void fastReset()
Invoked when a fast reset occurs.

Since:
BlackBerry API 4.1.0

backlightStateChange

void backlightStateChange(boolean on)
Invoked when the backlight state changes.

Parameters:
on - True if the backlight is on, false otherwise. Note that in bedside mode, when the screen is dimmed by the Clock application, the backlight is considered off.
Since:
BlackBerry API 4.1.0

usbConnectionStateChange

void usbConnectionStateChange(int state)
Invoked when the USB connection state changes.

Parameters:
state - One of the USB_STATE_ constants.
Since:
BlackBerry API 4.1.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal