public final class FlashlightUtils
extends java.lang.Object
desc : 闪光灯工具类
author : xuexiang
time : 2018/5/5 上午12:21
| Modifier and Type | Method and Description |
|---|---|
static FlashlightUtils |
getInstance()
Return the single
FlashlightUtils instance. |
static boolean |
isFlashlightEnable()
Return whether the device supports flashlight.
|
boolean |
isFlashlightOn()
Return whether the flashlight is working.
|
boolean |
register()
Register the utils of flashlight.
|
void |
setFlashlightOff()
Turn off the flashlight.
|
void |
setFlashlightOn()
Turn on the flashlight.
|
void |
unregister()
Unregister the utils of flashlight.
|
public static FlashlightUtils getInstance()
FlashlightUtils instance.FlashlightUtils instancepublic boolean register()
true: successfalse: failpublic void unregister()
public void setFlashlightOn()
public void setFlashlightOff()
public boolean isFlashlightOn()
true: yesfalse: nopublic static boolean isFlashlightEnable()
true: yesfalse: no