I have some problems with my widgets. Here is the description:
Context:
I have a home widget.
When I add it, it pops a configuration
Are you sure your code isn't relevant? Everything in your manifest is out of the book and looks good. Your code should look very similar to this:
public void configCancelOnClick(View v) {
MyLog.d(TAG, "configCancelOnClick");
Intent intent = new Intent();
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
setResult(RESULT_CANCELED, intent);
finish();
}
The putExtra is required to tell the os which widget you are not creating... The finish is required to shut down correctly. If you don't have it, you won't get the intent passed to the operating system correctly and lose the setResult.
Finally, when config doesn't exit correctly (back key, home key, or bad code), a ghost widget is created. Even with perfect code, if the user hits the home key while in config, you will have a widget queued to the system that does not really exist on any home screen. That's why I call them ghosts. Once a widget has successfully completed config, it will invoke onDeleted when removed from the home screen. You are left with the problem that, if ghosts have been created, onDisabled will never, ever, run.
One last check. Since config runs, you have the following in your info xml file. But just in case, it looks like this:
android:configure=your.package.name.ConfigurationActivity"