22

I've taken a screenshot of my app widgets in the Honeycomb emulator using the default "Widget Preview" application, but I don't know in which location the image has been saved. I've been looking around using adb shell commands as well as looking in the Gallery application but I haven't been able to find it. I can email it or send a MMS, but I guess that I don't need to setup a mail account on the emulator.

Is there an easy way to get the image which I've missed, or do I really need to setup a mail account on the emulator?

Thanks in advance.

Programmer Bruce
  • 64,977
  • 7
  • 99
  • 97
Kaloer
  • 3,773
  • 2
  • 27
  • 33

2 Answers2

37

Answering my own question: The source of the application is a part of the samples in the Honeycomb sdk. By looking at the source I found out that it is saved in the "Download" folder on the sd-card. Its name is [app_name]_ori_[orientation].png. For example Gallery_ori_landscape.png. Pull it from the emulator simply by using adb pull:

adb pull sdcard/Download/[app_name]_ori_[orientation].png [remote_location]

I probably asked the question too early, but I hope this will clarify the procedure for other who get this problem.

Kaloer
  • 3,773
  • 2
  • 27
  • 33
  • Did you ever figure out how to add a widget preview to your app? I can't find any documentaiton on this. – Hamid May 06 '11 at 21:23
  • 1
    Sure. Add this attribute to the the receiver tag which describes your widget in your Android manifest file: android:previewImage="@drawable/widget_preview" – Kaloer May 07 '11 at 16:03
12

You can download emulator WidgetPreview apk and then install on you Android phone/tablet. You'll get preview image on sdcard/Download

http://code.google.com/p/android-widget-preview/downloads/detail?name=WidgetPreview.apk

Alberto M.
  • 406
  • 4
  • 5