开发者

Android log event

Is there any nice to way to get not开发者_如何学Goifications/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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜