I want to save all the contents of log cat into specific file in Android. I used Eclipse IDE to develop the android application.
How i can achieve this ?
Thanks.
Here is a way to get the Logcat contents progrmatically.
Process process = Runtime.getRuntime().exec("logcat -d");
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(process.getInputStream()));
StringBuilder log=new StringBuilder();
String line = "";
while ((line = bufferedReader.readLine()) != null) {
log.append(line);
}
Check this link for more details.