How to get logs of other apps?
<p>I want to read logs from other apps and filter them so when a certain keyword is being logged, my application will perform a certain task.</p>

<p>I found several methods of reading logs, but from my testing I could only get my application logs.</p>

<p>This is the method I originally tried to use </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>But it seems like it only reads the logs of my app.</p>