Skip to main content

Posts

Showing posts with the label System Log

Android: To Display the system log inside your application

To display the system log inside your application, filtered for your own application-name, you could insert the following as an inner class: private static final String LogCatCommand = "logcat ActivityManager:I *:S" ; private static final String ClearLogCatCommand = "logcat -c" ; private class MonitorLogThread extends Thread{     public MonitorLogThread(){     }     BufferedReader br ;     @Override     public void run() {         try {             Process process;             process = Runtime.getRuntime().exec( ClearLogCatCommand );                 process = Runtime.getRuntime().exec( LogCatCommand );                 br = new BufferedReader ( new InputStreamReader (process.getInputStream()));     ...