I am having a code to store the log files to a SD card in android. The following is the code.
process = Runtime.getRuntime().exec("logcat "+ LOG_TAG +":D *:S");
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
StringBuilder log = new StringBuilder();
String line;
while ((line = bufferedReader.readLine()) != null) {
//do something over here
}
It is running an infinite loop. Any help.