you can also send call keyevent to answer calls
but the device needs to be rooted
answer calls :
try {
Thread.sleep(800);
Process process = Runtime.getRuntime().exec(new String[]{ "su","-c","input keyevent 5"});
process.waitFor();
}catch (Exception e) {
e.printStackTrace();
}
End calls :
try {
Thread.sleep(800);
Process process = Runtime.getRuntime().exec(new String[]{ "su","-c","input keyevent 6"});
process.waitFor();
}catch (Exception e) {
e.printStackTrace();
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…