5

I am using the Playbook Air SDK 2.1.0, trying to capture a bitmap of the contents of my webview. This is what I have tried:

var bmd:BitmapData = new BitmapData(webView.viewPort.width, webView.viewPort.height);
webView.drawViewPortToBitmapData(bmd);
var bitmap:Bitmap = new Bitmap(bmd);

view.stage.addChild(bitmap);

However, the bitmap being added to the stage is always blank white. I am wondering if anyone has used the QNXStageWebView.drawViewPortToBitmapData() successfully on Playbook?

1 Answers1

0

Are you waiting for webview to fully loaded?

webView.addEventListener(Event.COMPLETE,handleLoad);
Delcasda
  • 371
  • 4
  • 13
  • Pretty sure it was loaded as it happened as an AJAX hook if I remember (this was a while ago). Does it work for you on a real Playbook running the Playbook Air SDK 2.1.0? If so, I'll check it out next time I have a device. – Stephan van den Heuvel May 02 '13 at 01:15