You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 12, 2017. It is now read-only.
I tried to use screenrecordex to record screen using my app (not command prompt). I pushed this file to /data/data/tmp folder and set the specified permission (755) through code. Now when I execute process to record screen, it shows that process has started but after then my app hangs and nothing goes well. I terminated my app and saw that a video file is created on my sd card with size 0 bytes. I debugged my code and I found issue while running this file through code. Below is sample of my code to execute this and record video:
try {
final Process process = Runtime.getRuntime.exec(recordxFile + " /sdcard/demo.mp4");
// BufferedReader bufferedReader = new BufferedReader(
// new InputStreamReader(process.getInputStream()));
LogUtils.LogD("Recording...");
// String line;
// while ((line = bufferedReader.readLine()) != null) {
// LogUtils.LogD("Output", line);
// }
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
It app hangs at bufferedReader.readLine() while reading the output of process. I also tried to run --help and --verbose but got no output but in that case app does not hang.
So, can you please tell me what I am doing wrong or suggest a way to record video by executing this file from Android app.
Thanks.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I tried to use screenrecordex to record screen using my app (not command prompt). I pushed this file to /data/data/tmp folder and set the specified permission (755) through code. Now when I execute process to record screen, it shows that process has started but after then my app hangs and nothing goes well. I terminated my app and saw that a video file is created on my sd card with size 0 bytes. I debugged my code and I found issue while running this file through code. Below is sample of my code to execute this and record video:
try {
final Process process = Runtime.getRuntime.exec(recordxFile + " /sdcard/demo.mp4");
// BufferedReader bufferedReader = new BufferedReader(
// new InputStreamReader(process.getInputStream()));
LogUtils.LogD("Recording...");
// String line;
// while ((line = bufferedReader.readLine()) != null) {
// LogUtils.LogD("Output", line);
// }
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
It app hangs at bufferedReader.readLine() while reading the output of process. I also tried to run --help and --verbose but got no output but in that case app does not hang.
So, can you please tell me what I am doing wrong or suggest a way to record video by executing this file from Android app.
Thanks.
The text was updated successfully, but these errors were encountered: