views:

1121

answers:

3

I am starting with Android programming with the help of Unlocking Android / Manning which came from Santa and is a pretty good book. After running a few little tests and examples, I'm moving towards developing the concepts for my own application.

I want my App to execute as a Home Widget and I'm using this example as my model to get started.

While I am able to load and run in the Android ADB emulator the code example in the example's Wiktionoary which is a normal Android App. I am not able to run, but only load into the emulator the Widget version of that code named SimpleWiktionary.

Am I am able to debug Android Home Widgets with the emulator? If so, what am I missing on starting/activating the Widget or having it show up in the Apps window?

T, Kenny

+3  A: 

Widgets don't show up with icons like most other applications would. To add one to the home screen, long press on the background wallpaper and you should see a context menu pop-up that will allow you to add a widget to the screen. If you AndroidManifest.xml is set up correctly, your widget should be shown in the menu.

You should be able to debug it by setting breakpoints in Eclipse like you would for debugging any other Android app. However, if your widget isn't displayed on the home screen, none of the code will be executed.

Erich Douglass
Awesome. I missed that part about the long click. Thanks!
kenny
+2  A: 

Debugging android widgets is almost same as debugging any normal app. You can follow this link for a step by step info about how to go about it. How to debug android widgets in eclipse

Shantanu Goel
A: 

Try using the DDMS. in eclipse choose window->open perspective->DDMS

JeffC