By the way, I went the "invisible instant Activity" path for the
Widget configuration because there are a number of horrible use-cases
with the Widget installation process that Android does not handle
properly and spending any time in the config activity can result in
bad things like ghost widgets (two types of ghost, one is where the OS
thinks the widget is there but it is not, the other is where my App
thinks the widget is there but is it not). These can be caused by
things like not enough home screen space or unintented power down (eg
battery fail) before the config activity returns the RESULT_OK. It
took quite some time to nut out these rare use-cases.

On Feb 3, 8:32 am, David Ross <grand...@vacuumpunk.com> wrote:
> In my Widget I have a "dummy" configuration App that does as the
> earlier poster said, it just runs, does some internal housekeeping
> like setting up default preferences and returns the provided
> AppWidgetId and RESULT_OK:
>
>         Intent resultValue = new Intent();
>         resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
> appWidgetId);
>         setResult(RESULT_OK, resultValue);
>
> It does not even inflate a layout, after setting the result it does a
> finish(). It is an invisible configuration activity so that the user
> gets the effect of the Widget appearing instantly after selecting it
> for installation.
>
> Are you saying that does not work?
>
> On Feb 3, 7:06 am, Mark Murphy <mmur...@commonsware.com> wrote:
>
> > On Thu, Feb 2, 2012 at 6:01 PM, phoku <mboeh...@fh-muenster.de> wrote:
> > > Is there anything new about this bug?
>
> > It is not a bug.
>
> > > I am developing a "widget-only" app,
>
> > You can no longer do that.
>
> > > i.e. I do not have any activity to present to the user. How can I allow 
> > > him
> > > to add my widget without rebooting?
>
> > Put in an activity to present to the user. This is unavoidable,
> > AFAICT, on Android 3.1+. You will need it at first install, and you
> > will need it if the user elects to force-stop your application.
>
> > --
> > Mark Murphy (a Commons 
> > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > _The Busy Coder's Guide to Android Development_ Version 3.7 Available!
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to