I'm developing a simple utility to record the screen of device using the new function of kitkat 4.4. So, I've create a button with various edit text for the parameters such as bit rate, seconds and file name. I've this code.
StringBuilder builder;
builder = new StringBuilder("system/bin/screenrecorder");
When i retrieve the parameters do something like
builder.append(" --bit-rate ").append(editText.getText());
Finally I've the complete command to record, like
"system/bin/screenrecorder --size 720x1184 --bit-rate 5 --time-limit 5 /storage/emulated/0/MyVideos/example.mp4"
My question now is this:
How can i execute this command? In other words, what should I do now to start recording using the variable builder?