| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.nokia.mid.ui.DeviceControl
public class DeviceControl
DeviceControl provides a collection of static methods to control device features such as vibra, backlights, and active cover lights.
| Field Summary | |
|---|---|
| static int | KEYMAT_ALPHANUMERIC | 
| static int | KEYMAT_DEFAULTKeymat Light modes available. | 
| static int | KEYMAT_NUMERIC | 
| static int | KEYMAT_OFF | 
| Method Summary | |
|---|---|
| static void | flashLights(long duration)Flashes the lights for a specific length of time given as milliseconds in duration parameter. | 
| static int | getUserInactivityTime()Function return the time since the last user activity in seconds. | 
| static void | resetUserInactivityTime()Function reset user inactivity time. | 
| static void | setLights(int num,
          int level)Activates and deactivates the lights on the device. | 
| static void | startVibra(int freq,
           long duration)Activates vibration for a given length of time and frequency. | 
| static void | stopVibra()Stops any vibration. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final int KEYMAT_DEFAULT
public static final int KEYMAT_NUMERIC
public static final int KEYMAT_ALPHANUMERIC
public static final int KEYMAT_OFF
| Method Detail | 
|---|
public static void setLights(int num,
                             int level)
level is a value
  between 0-100, which indicates the brightness of the light.
  For extension lights, the range of valid values for parameter
  level depends on the type of lighting extension,
  and the specific product features.
num - light target. 0 is used for display backlight, and
             1 for light extensions like active coverslevel - lighting level for backlights target, or
               sequence number for lighting extension
java.lang.IllegalArgumentException - if num or level are
                                             not supported.public static void flashLights(long duration)
duration - length of time in milliseconds that the
                  effect should be active
java.lang.IllegalArgumentException - if duration < 0
public static void startVibra(int freq,
                              long duration)
DeviceControl.startVibra(0,0); can be used
  to detect whether vibration is supported (IllegalStateException
  not thrown) or not (IllegalStateException thrown) without any
  vibration occuring even if it is supported.
freq - the frequency of the vibra device.
              Value 0 can be used for detecting whether or
              not there is a vibration device. 100 means
              the maximum frequency value of a specific system.
              1 must always result in a minimum non-zero
              vibration.duration - the length of time in milliseconds the
                  vibration is active.
java.lang.IllegalStateException - - The use of vibration is
              not allowed or the system does not have vibration
              support.
java.lang.IllegalArgumentException - if duration or
              freq is < 0, or freq is > 100.public static void stopVibra()
startVibra(int freq, long duration).
  If vibration is not active, the method silently returns.
public static int getUserInactivityTime()
public static void resetUserInactivityTime()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||