0

Do webviews running in a kindle fire app (also on a kindle fire HD) support javascript console.log or alerts?

I have my kindle fire HD connected through usb debugging and ddms to my computer, and I'm seeing lots of log data but no messages from a webview where my javascript code is calling both alert('alert test') and console.log('log test');

I'm surprised how little information there is, even in the phonegap forums. It's like I'm the first person to ever have to troubleshoot javascript running in a webview on a kindle fire app, which seems strange since the hardware has been out for a while.

Anony372
  • 494
  • 2
  • 15
  • You can test it like `if(console == undefined) alert('No Console!');` – techfoobar Jan 24 '13 at 05:32
  • I can't even get an alert to work, and I can't find any info if console.log or alert are even supported. – Anony372 Jan 24 '13 at 05:37
  • You might want to look at this: http://log4js.berlios.de/ – Jeremy J Starcher Jan 24 '13 at 09:42
  • @JeremyJStarcher I might use a logging solution, but that doesn't answer my question. I'm trying to determine if webviews support console.log or alerts on the kindle fire HD. I reworded my question to make it more clear. – Anony372 Jan 24 '13 at 17:02

1 Answers1

1

My own testing on a kindle fire HD system version 7.2.3 shows:

Web (silk): support for alert() but no support for console.log() (even when hooked up to adb/ddms)

Webview: no support for alert() and no support for console.log() (even when hooked up to adb/ddms)

Wish I could find more information on debugging webview applications on the kindle fire. I'll be trying out some javascript based logging solutions instead.

edit: used jsconsole successfully on a kindle fire HD to retrieve console.log messages and run javascript on the fly. http://jsconsole.com

Anony372
  • 494
  • 2
  • 15