Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
wmatt
Posts: 125
Registered: ‎10-02-2011
My Device: Playbook

Screenshot from Dev Alpha Simulator

Is there a way to get a high resolution screenshot from the Dev Alpha simulator?

 

"Screenshots must be sized at either 1280x768 (landscape) or 768x1280 (Portrait) pixels"

Developer
shaan_softwaredvlpr
Posts: 172
Registered: ‎01-17-2011
My Device: 9500 series

Re: Screenshot from Dev Alpha Simulator

By pressing volume down & up buttons at once , you will have device screenshot image in camera folder
Developer
wmatt
Posts: 125
Registered: ‎10-02-2011
My Device: Playbook

Re: Screenshot from Dev Alpha Simulator

How do you press them both at once in the simulator?

Developer
shaan_softwaredvlpr
Posts: 172
Registered: ‎01-17-2011
My Device: 9500 series

Re: Screenshot from Dev Alpha Simulator

Oops Sorry , i dint notice you asked for simulator..
Appologies..
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Screenshot from Dev Alpha Simulator

You can do a screen shot of the window and crop off the rest you dont want.
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course

Re: Screenshot from Dev Alpha Simulator

Press PrintScreen on your keyboard, then paste the image into Photoshop to crop it.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
New Contributor
ktylman
Posts: 8
Registered: ‎12-18-2012
My Device: Playbook

Re: Screenshot from Dev Alpha Simulator

[ Edited ]

wmatt wrote:

Is there a way to get a high resolution screenshot from the Dev Alpha simulator?

 

"Screenshots must be sized at either 1280x768 (landscape) or 768x1280 (Portrait) pixels"


The annoying thing about trying to get the screen shots from the simulator is that it is scaled by default so using PrintScreen won't work. I haven't tried it but there is a telnet command to resize the simulator as described here https://developer.blackberry.com/develop/simulator/simulator_configuring.html

 

What I eventually settled on was just running my AIR app in the debugger and writing a PNG file out. I actually use this method for all my apps. Since I release across multiple platforms, this is a lot easier than trying to capture screen shots for a dozen different resolutions.

 

Here is a simplified version of the code I use. I put this in my main key handler method.

 

// l_screenWidth, l_screenHeight - Dimensions of the application window
// this - main sprite container. Dimensions should match app screen width and
// be located at 0, 0
// l_fileName - The name of the file. This will be located in your storage
// directory. On Windows 7 this is usually <User>/AppData/Roaming/<package>.debug

if (67 == event.keyCode) // 'c' { var l_bitmapData&colon;BitmapData = new BitmapData(l_screenWidth, l_screenHeight, false, 0xFFFFFFFF); l_bitmapData.draw(this);

   var l_stream:FileStream = new FileStream();
   var l_file:File = File.applicationStorageDirectory;
   l_file = file.resolvePath(l_filePName);

var l_ba:ByteArray = PNGEnc.encode(l_bitmapData);
   l_stream.open(l_file, FileMode.WRITE);
   l_stream.writeBytes(l_ba, 0, l_ba.length);
   l_stream.close(); }

 In the above example "this" can be any sprite. My apps are structured so the top level sprite is the root container and it is the same size as the screen. I did not put the complete code here. Just what was necessary. If you're going to use this you'll most likely want to add some error handling. You'll also need to get the PNGEnc class from here http://www.kaourantin.net/2005/10/png-encoder-in-as3.html

 

Hope this helps somewhat.

Ken Tylman

Grim Guy Gameworks

http://grimguygameworks.com

 

 

 

 

 

Ken Tylman
Grim Guy Gameworks