Android log event
-
26-09-2019 - |
Question
Is there any nice to way to get notifications/intents/changes from the systemlog in Android.
Logcat only shows the latest part of the systemlog which I find very limited and I would like to stream the changes to a webserver or such from an application.
/Br Johannes
Solution
Provided that your app requires android.permission.READ_LOGS, you can run logcat on the device itself, and read its output with Process.getInputStream().
I haven't tested it, but I think it should allow to retrieve live logcat output (provided that you omit the -d option in the example above).
Apart from running logcat on the device, I don't think there's any way to access the log or get notified about new messages.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow