api
1. 开关背光
Intent intent = new Intent("android.yide.intent.action.backlight");
intent.putExtra("enable" , false); // 屏幕背光, false: 打开 , true:关
闭
sendBroadcast(intent);
代码:
\192.168.0.230longmrk312x-7.1-boxsdkpackagesys_receiversrccomysys_receiverys_receiver.java
else if (STRING_backlight_yide.equals(action)){
Boolean state=intent.getBooleanExtra("enable",false);
Log.d(TAG,STRING_backlight_yide+"bl"+state);
bl_onoff(!state);
}
adb
am broadcast -a android.yide.intent.action.backlight --ez enable "false"
public void bl_onoff(Boolean mode){
try {
FileOutputStream fops = new FileOutputStream("/sys/class/custom_class/custom_dev/blen");
if(mode)fops.write("1".getBytes());
else fops.write("0".getBytes()); 


