Archive for January, 2010

How to Take Screenshots on Android Devices

I’ve been playing around with Android recently, and I ran into a situation where I needed to take screenshots of applications running on the device (as opposed to on my desktop with the emulator). Most of the information I found on Google recommended that I install a third-party application, but I learned a quick and simple way to do it without having to install anything.

Assuming you have the Android SDK installed (which, if you’re doing development, you obviously do), simply:

  1. Connect your Android device (I’m using a Droid) via USB.
  2. Run android-sdk-mac_86/tools/ddms (hint: put the tools directory in your path to make your life much easier).
  3. Select the device in the Dalvik Debug Monitor.
  4. Type Control + s, or go to Device > Screen Capture.

Not quite as easy as taking screenshots on the iPhone (simply press the power button, then the menu button at the same time), but if you need the screenshot on your desktop rather than in your photo album on your phone, it’s a very efficient solution.

Setting HTML Focus From Flash or Flex Content in AIR

It is possible to set HTML focus from Flash or Flex content in AIR, but it takes a little finessing. The key is to focus the HTMLLoader before setting focus to something inside the HTMLLoader. The code below shows an HTML text input getting focus when the document loads, and it shows how to set focus on-demand from Flash or Flex. I’ll let the code explain the rest:

Continue reading…