PlayBook: Power Consumption    Posted:


I've been taking power consumption measurements while running the PlayBook under various loads, and some of the results are pretty interesting. I'll write up more later, but here's an initial overview of some data that may be useful to you, either as a user, or as a developer.

First a bit of background. The PlayBook has two battery packs in it, with the combined pair providing nominally 5400mAh, which at an average voltage of 3.7V provides 19.98Wh of energy. See for example the ifixit.com teardown for some pics of the labelling.

Read more…

Comments

PlayBook Browser Viewport Size    Posted:


Although the resolution of the screen on the 7" PlayBook is 1024x600, the browser window size is always less.

In the default configuration, the browser viewport is 1024x512 pixels. That's when the back/forward buttons, address field, history/bookmark and fullscreen toggle switch are showing.

I think it would have been nice if "fullscreen" mode on the browser eliminated all window chrome, including the title bar, but unfortunately that's not how they've done it.

Read more…

Comments

PlayBook: Errata #1    Posted:


Wow, I've been slow getting back to this non-blog. Sorry for the long silence, and I do intend to post more often again.

In the last couple of months, much has happened and, unfortunately, a few things have not. For one thing, we don't have our PlayBooks yet, as of this writing. Nor do we have a 1.0 SDK and a decent simulator. Nor, for that matter, has the PlayBook even been released, except to a few lucky members of the press.

Nevertheless, information does ooze out, be it ever so slowly. A few things contradict or outdate things I said earlier. I'll summarize the changes here:

Read more…

Comments

PlayBook: debug trace() statements    Posted:


When debugging AIR apps in the PlayBook simulator, you build your app using the -debug option to the amxmlc compiler... or your IDE does it for you. With that flag, and appropriate options passed to blackberry-airpackager (specifically -target bar-debug) and blackberry-deploy (-debugHost X.X.X.X), your app will attempt to connect to the debugger running at the specified address, and among other useful things you'll be able to see the output of your trace() calls.

But what if you decide to cancel the debug session, or just never start it, and only then find a problem with your app? You might have to restart, this time connecting to the debugger. This is never a good situation, and you'll be lucky if you can reproduce the problem.

Read more…

Comments

PlayBook: Top-Swipe Menu    Posted:


Warning: the approach described here for SWIPE_START was carefully designed based on the observed performance of the simulator as it was at the time. Unfortunately, at least one app built around this approach does not work correctly on the "1.0" software running on the real hardware. If you've used this code in your app, you may encounter the same issue, in which case for now, switching to the more primitive SWIPE_DOWN mechanism.

In the BlackBerry PlayBook Developer Forum (Tablet OS SDK for Adobe AIR) there have been several threads about the SWIPE_START event and SWIPE_DOWN event and how to use them to implement an application menu. None of these have yet given a complete picture of how those events really work. But don't worry, I've analyzed it all for you!

Read more…

Comments

PlayBook: SWIPE_START Simplified    Posted:


Warning: in the 1.0 release, SWIPE_START may no longer work exactly as described here. If you use it in your app, you may need to switch to SWIPE_DOWN until the 1.0 software has been released and can be analyzed fully.

In my previous post I wrote at length about the two ways to handle top-swipe events with the Adobe AIR SDK in the BlackBerry PlayBook.

As always happens after I spend a long time polishing some code and writing documentation for it, shortly afterwards I realized it could be simplifier. In this case, there's a way to use swipeStart without dealing with mouseMove at all.

Read more…

Comments

Convert EPS to PNG with ImageMagick    Posted:


Coincidentally, after getting by until recently without having a good reason to try ImageMagick, I needed it again just today. I had a company logo in EPS format which I needed turned into PNG format.

Since I'm on Windows, and don't have Adobe Photoshop, this isn't a 10-second operation. At least, not until you install the right stuff. Even on Windows, however, ImageMagick knows how to call out to Ghostscript if it's installed.

Read more…

Comments

PlayBook Simulator FTP Transfer Fails    Posted:


This morning one of the forum posts was a question about problems using URLLoader to retrieve a file over FTP.

My first response was to suggest that the poster may be mistakenly thinking he could use the HTTP protocol to get to something over FTP. There was nothing in the URLLoader docs to suggest it handles FTP, and as usual with my ActionScript3 queries I found almost nothing on the web with a search or two, other than one post where people said you can't do it.

Read more…

Comments

PicasaPhotoViewer Process Doesn't Terminate    Posted:


I have the Picasa photo viewer (PicasaPhotoViewer.exe) set up as my default app for basic image viewing. It's generally fast, makes it easy to scroll through a folder full of images, and lets me zoom in and out at lightning speed using the mouse wheel. All good.

Unfortunately, sometimes I would notice in my Task Manager window (this is on Windows 7 Pro) that I had a whole pile of PicasaPhotoViewer.exe processes still running, even with no photos left open onscreen. It was easy to terminate them (though with 30 processes a bit tedious) but it's always annoying when things like that happen, especially when you can't find an obvious answer.

Read more…

Comments

Using ImageMagick to Filter Page Scans    Posted:


I had a need to clean up some not-so-great scans of photocopies. The pages included both text and music. This made it a bit tricky to process since the music had very thin lines. I needed the text darker, but without amplifying the background noise, and this tended to fade out the lines in the staff. I was able to get good results from Paint.NET using just the Auto Levels adjustment but I had 48 pages to process and there's no way I was going to do it manually; as far as I know you can't script Paint.NET.

I briefly considered a few options, including GIMP, before re-stumbling over ImageMagick, which I've known about for ages but actually never had a need to use before. Quoting from its web site, it's "a software suite to create, edit, compose, or convert bitmap images.... [It is] typically utilized from the command line...." It handles just about every format under the sun including JPEG and PDF, which is what I needed.

Read more…

Comments