I use the following code to read the logcat in Android.
Process process = Runtime.getRuntime().exec("logcat -v time");
Since the logcat file size is large, I have to filter the logcat messages. So I used the following code to filter logcat.
Process process = Runtime.getRuntime().exec("logcat -v time | grep -v -E \"(libloc|RPC)\"");
where (libloc|RPC) are tags.
But Grep code is not working in Android. Can anyone please help me with this?