views:

425

answers:

3

i'm running one web application... in android emulator browser

in one java script file i trying to output some string as

console.log("android");

but i didn't got this log using adb logcat

even i tried to start adb logcat firstly and then tun the app. but didn't got log message which i used in console.log

is there any way so i can get my log message ...

A: 

I don't think Android's browser supports console.log, nor do I believe it is possible to write to logcat from within the browser.

RoToRa
is there any other way.... ?i have to get some text from js and thats to big enough so i can't just type them seeing alerts...
R_Dhorawat
You could try opening a new window and writing to it: `window.open("", "").document.write("example")`
RoToRa
A: 

I'm not sure exactly what you are trying to achieve, but from what I can assume, you are trying to make a web app compatible with Android or so?

Use Firefox with the following add-ons: User Agent Switcher and FireBug.

velazcod
already tried that but results are different in both case...(using firefox with useragent switcher and firebug) and in android browser
R_Dhorawat
+1  A: 

There is some info about this on the nitobi/phonegap blog:

http://blogs.nitobi.com/joe/2010/02/26/console-log-on-android-webview/

Jonathan Stark