How to read Activity name from log cat in android?
<p>How we can Read Activity name from <code>logcat</code> in Android?
I used some code but didn't get Activity name which I launched.  </p>

<pre><code>String baseCommand = "logcat -d time";
baseCommand += " ActivityManager:I "; // Info for my app
baseCommand += " *:S "; // Silence others
try
{
    Process logReaderProcess = Runtime.getRuntime().exec(baseCommand);
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(logReaderProcess.getInputStream()));

    while ((line = bufferedReader.readLine()) != null)
    {
        Log.e("This is Camera open log",""+log);
        log.append(line); // here readLine() returns null
    }
}
catch (IOException e1)
{
    e1.printStackTrace();
}
</code></pre>

<p>Can someone please suggest a solution?</p>
