|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
de.enough.polish.util.DeviceControl
public class DeviceControl
Controls backlight and vibration in an device-independent manner.
Copyright Enough Software 2007 - 2012
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Method Summary | |
|---|---|
static void |
hideSoftKeyboard()
Hides the softkeyboard if the device supports it. |
static boolean |
isFallbackToNetworkLocationOnGpsDisabled()
Deprecated. |
static boolean |
isGpsEnabled()
Deprecated. Use LocationService.isGpsEnabled() |
static boolean |
isLightSupported()
Checks if backlight can be controlled by the application |
static boolean |
isSoftKeyboardShown()
Checks is a virtual keyboard is currently shown. |
static boolean |
isVibrateSupported()
Checks if vibration can be controlled by the application |
static void |
lightOff()
Turns the backlight off |
static boolean |
lightOn()
Turns the backlight on on a device until lightOff() is called |
void |
run()
|
static void |
setSuicideOnExit(boolean suicideOnExit)
|
static void |
shouldFallbackToNetworkLocationOnGpsDisabled(boolean setFallbackOnGpsDisabled)
Deprecated. |
static void |
showSoftKeyboard()
Shows the softkeyboard if the device supports it. |
static boolean |
vibrate(int duration)
Vibrates the device for the given duration |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public void run()
run in interface Runnablerun in class Threadpublic static boolean lightOn()
lightOff()public static void lightOff()
lightOn()public static boolean isLightSupported()
lightOn(),
lightOff()public static boolean vibrate(int duration)
duration - the duration in milliseconds
public static boolean isVibrateSupported()
public static void showSoftKeyboard()
hideSoftKeyboard(),
isSoftKeyboardShown()public static void hideSoftKeyboard()
showSoftKeyboard(),
isSoftKeyboardShown()public static boolean isSoftKeyboardShown()
showSoftKeyboard(),
hideSoftKeyboard()public static void setSuicideOnExit(boolean suicideOnExit)
public static void shouldFallbackToNetworkLocationOnGpsDisabled(boolean setFallbackOnGpsDisabled)
setFallbackOnGpsDisabled - true if you want to disable the fallback mechanism, false otherwise.public static boolean isFallbackToNetworkLocationOnGpsDisabled()
shouldFallbackToNetworkLocationOnGpsDisabled(boolean) for details.
true if the fallback is disabled, false if the fallback is enabled (the default).public static boolean isGpsEnabled()
LocationService.isGpsEnabled()
true if GPS is enabled, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||