Debugging Android Widget Code In Eclipse

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


Asked by: Melissa227 | Posted: 20-01-2022






Answer 1

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.

Answered by: Thomas273 | Posted: 21-02-2022



Similar questions

android - Debugging ADT Eclipse Plugin Install

I've installed the Android SDK and the ADT plugin, but Android doesn't show up in the Window>Preferences... dialog. I'm running Galileo. If I go to the Installation Details part of the About Eclipse dialog, it says that I have 0.9.6 of Android DDMS and Android Development Tools. I can run adb from the command line. I tried going around the uninstall/reinstall loop once. I'm on Windows Vista. I also have 2.7...


linux - Nexus One Android Debugging in Ubuntu 9.10

I can't get Ubuntu 9.10 to recognize the Nexus One as a debug device. I tried following the instructions found here but they are not working: http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10 Anyone know of a link or know how to get the Nexus One to debug correctly in Ubuntu 9.10?


android - Debugging ADT Eclipse Plugin Install

I've installed the Android SDK and the ADT plugin, but Android doesn't show up in the Window>Preferences... dialog. I'm running Galileo. If I go to the Installation Details part of the About Eclipse dialog, it says that I have 0.9.6 of Android DDMS and Android Development Tools. I can run adb from the command line. I tried going around the uninstall/reinstall loop once. I'm on Windows Vista. I also have 2.7...


linux - Low level Android Debugging

Is there a way to trace through function calls at the lowest levels of the Android system? Right now when I debug in Eclipse, it goes through the source files that are located inside the frameworks folder, but is it possible to go even lower? For example show what functions are being called from the libcore folder. I am also interested to find how it communicates with the linux kernel at the bottom of the layers. Is there ...


Debugging an Android app to the phone

I've gone through the page Using Hardware Devices. My manifest has <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"> My phone has Menu -> Settings -> Applications -> Development -> USB ...


debugging - Can't debug Android: This device cannot start. (Code 10)

I have a brand new Nexus One. I'm trying to follow the directions for installing the USB driver. When I plug in the device, it doesn't start the New Hardware Wizard, as the documentation suggests. I can run hdwwiz.exe to launch it and manually install the driver, but when I do, Device Manager ...


debugging - How to prepare KML file for Android Emulator Control?

I am trying to test my application with location information. You know the Emulator Control has an ability to load from KML file. (Eclipse -> DDMS -> Emulator Control -> Location Controls -> KML -> Load KML...) I've prepared KML file using Google earth application with its "Add path". Then saved it by .kml extension and load it on the Eclipse. Eclipse didn't load this KML file. How to prepare KML file for Android E...


debugging - How to Debug on the Samsung Galaxy I7500 Android Phone

How to Debug on the Samsung Galaxy I7500 Android Phone? modify c:\android-sdk-windows-1.5_r3\usb_driver\x86\android_usb.inf under the [Google.NTx86] entry add ; SAMSUNG GALAXY %USB\VID_04E8&PID_6640.DeviceDescRelease%=androidusb.Dev, USB\VID_04E8&PID_6640 %USB\VID_04E8&PID_6640&MI_04.DeviceDescRelease%=androidusb.Dev, USB\VI...


debugging - Cannot step through code in debugger (Android)

For some reason I can't step through the code in the debugger. I am not trying to step through Android source code, just code that resides in my project. My build paths are setup to include it, but whenever I try stepping over anything it gives me a "Source not found" message.


linux - Nexus One Android Debugging in Ubuntu 9.10

I can't get Ubuntu 9.10 to recognize the Nexus One as a debug device. I tried following the instructions found here but they are not working: http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10 Anyone know of a link or know how to get the Nexus One to debug correctly in Ubuntu 9.10?


android - Debugging ADT Eclipse Plugin Install

I've installed the Android SDK and the ADT plugin, but Android doesn't show up in the Window>Preferences... dialog. I'm running Galileo. If I go to the Installation Details part of the About Eclipse dialog, it says that I have 0.9.6 of Android DDMS and Android Development Tools. I can run adb from the command line. I tried going around the uninstall/reinstall loop once. I'm on Windows Vista. I also have 2.7...


Android debugging timeouts

My activity occasionally gets hung somewhere in it's looper. From the log I can see an eventual timeout is logged, and then there's a win-death. WARN/ActivityManager(1052): Activity pause timeout for HistoryRecord{1234 {com.company.app/com.company.app.App}} ... WARN/ActivityManager(1052): Activity idle timeout for HistoryRecord{1234 {com.company.app/com.company.app.App}} ... INFO/Process(416): Sendi...


linux - Low level Android Debugging

Is there a way to trace through function calls at the lowest levels of the Android system? Right now when I debug in Eclipse, it goes through the source files that are located inside the frameworks folder, but is it possible to go even lower? For example show what functions are being called from the libcore folder. I am also interested to find how it communicates with the linux kernel at the bottom of the layers. Is there ...


Debugging an Android app to the phone

I've gone through the page Using Hardware Devices. My manifest has <application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"> My phone has Menu -> Settings -> Applications -> Development -> USB ...


debugging native code (C++) using gdb on android with Eclipse. Is it possible?

I have some piece of code which uses JNI. I can debug code wrote in Java directly in Eclipse (using ADT). I even have a script, which help me debug native code with gdb. However this is not very comfortable way for doing this. Is it possible to configure Eclipse to use gdb (I guess gdbserver) for debbuging android native applications? Do you know where I could find any description of this?






Still can't find your answer? Check out these communities...



Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android



top