I'm coding an utility to make a showcase movies on the PC of the apps running on the Android devices. I was able to do it using xuggler (http://www.xuggle.com/xuggler) and ddmlib. It is really easy to obtain image as RawImage from the Android's adb using ddmlib, but now i need to get Logcat data from the moments when I shot the movie. I can't find any examples to obtaint he Logcat data; the logcat package has some classes to handle Logcat messages, but none to instantiate it. Anybody, help! I'll be glad to see any example how to obtaing logcat messages using ddmlib.

有帮助吗?

解决方案 2

Thank llya Yevlampiev,This help me developing android logcat api on ddmlib.

Custom Logfilter

其他提示

I have fount that it is possible using

LogCatReceiverTask lcrt;
LogCatListener lcl;
lcrt=new LogCatReceiverTask(devices[0]);
lcl= new LogCatListener() {
            @Override
            public void log(List<LogCatMessage> msgList) {
                System.out.println("Called with messages list length "+msgList.size());
                for (LogCatMessage msg : msgList) {
                    // System.out.println(msg.toString());
                    /*

                    System.out.println(msg.getTime());
                    System.out.println(msg.getPid());
                    System.out.println(msg.getLogLevel());
                    System.out.println(msg.getAppName());
                    System.out.println(msg.getTag());
                    System.out.println(msg.getTid());
                    System.out.println(msg.getMessage());
                    */
                    logcat = logcat + msg.toString() + "\n";
                }
            }
        };

    }
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top