문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top