public final String pamute = "tinymix 1 1";
public final String mixpas = "tinymix 2 1";
public final String fmr = "tinymix 8 1";
public final String fml = "tinymix 9 1";
public final String mixen = "tinymix 15 1";
/**
* 授权root用户权限*
* @param command
* */
public boolean rootCommand(String command) {
Process process = null;
DataOutputStream dos = null;
try {
process = Runtime.getRuntime().exec("su");
dos = new DataOutputStream(process.getOutputStream());
dos.writeBytes(command + "\n");
dos.writeBytes("exit\n");
dos.flush();
process.waitFor();
} catch (Exception e) {
return false;
} finally {
try {
if (dos != null) {
dos.close();
}
process.destroy();
} catch (Exception e) {
}
}
return true;
}
现在新问题来了。
就是 播放蓝牙声音时,按虚拟键盘的按键时,蓝牙就没声音 咯 adb shell进去了看了。 是pamute这个寄存器为off。不是on
android中,view的按键音类型为系统音频(STREAM_SYSTEM),而音量的大小与媒体音量(STREAM_MUSIC)绑定了起来。
这个。要在虚拟键盘处理时发个广播。然后 把pamute这个寄存器写1.即on状态。。