tags:

views:

144

answers:

3

hi, I want to view the Log on device i.e the System.out.println(); I am able to view on DDMS but how to view on device screeen while running an apk file

A: 

Run 'adb logcat' on the command line of your PC would also work. You want to see the log output on the device's screen though? Hmm, why? I don't believe you can call up a shell or access the logs from an application, unless your device is rooted.

What you can do, of course, is create a TextView in your app, and update its contents with whatever message you like.

Sean Owen
+1  A: 

Provided you have root on your phone you can use the logcat utility in the Terminal application:

# logcat
D/dalvikvm(  142): GC freed 200 objects / 8744 bytes in 254ms
etc..

It displays the same log (/dev/log/main) as the adb logcat command that was suggested in another answer.

Josef
+2  A: 

There is also a Logcat app available for android.

code.google.com/p/android-random/downloads/list

cstamas