title: Read logcat programmatically within application
body: <p>I want to read and react to logcat logs within my application.</p>
  
  <p>I found the following code: </p>
  
  <pre><code>try {
    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);
    }
    TextView tv = (TextView)findViewById(R.id.textView1);
    tv.setText(log.toString());
    } 
  catch (IOException e) {}
  </code></pre>
  
  <p>This code indeed returns the logcat logs that made until the application was started  - </p>
  
  <p>But is it possible to continuously listen to even new logcat logs?</p>