net.rim.device.api.system
Interface SystemListener2

All Superinterfaces:
SystemListener

public interface SystemListener2
extends SystemListener

The listener interface for receiving system events.

Since:
JDE 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

public static final int POWER_OFF_KEY_PRESSED
Since:
JDE 4.1.0

USB_STATE_CABLE_CONNECTED

public 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).

Since:
JDE 4.1.0

USB_STATE_CABLE_DISCONNECTED

public 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).

Since:
JDE 4.1.0

USB_STATE_ENUMERATED

public 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).

Since:
JDE 4.1.0

USB_STATE_MS_INTERFACE_ENUMERATED

public 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)

Since:
JDE 4.2.0

USB_STATE_MTP_INTERFACE_ENUMERATED

public 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)

Since:
JDE 4.7.0

USB_STATE_NOT_ENUMERATED

public 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.

Since:
JDE 4.1.0
Method Detail

backlightStateChange

public void backlightStateChange(boolean on)
Invoked when the backlight state changes.
Parameters:
on - True if the backlight is on, false otherwise.
Since:
JDE 4.1.0

cradleMismatch

public 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:
JDE 4.1.0

fastReset

public void fastReset()
Invoked when a fast reset occurs.
Since:
JDE 4.1.0

powerOffRequested

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

Parameters:
reason - POWER_OFF_KEY_PRESSED
Since:
JDE 4.1.0

usbConnectionStateChange

public void usbConnectionStateChange(int state)
Invoked when the USB connection state changes.
Parameters:
state - One of the USB_STATE_ constants.
Since:
JDE 4.1.0



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.