Jake,

You can watch for ACTION_APPWIDGET_UPDATE with a previously unseen widget Id, or specify a configuration activity for the widget. The config activity can be made transparent and finish right away, so it's just there as a callback for your logic.

But if you do that, you've got to be really careful because of various edge cases and Android and launcher issues (also consider replacement launchers) .

Why not just let the user create as many widgets as they like, and let the user decide?

-- Kostya

27.02.2011 17:24, Jake Colman пишет:
"S" == String<[email protected]>  writes:
    S>  There's no way to prevent it, no.

    S>   IMHO, your best bet is to handle it gracefully: if the user wants
    S>   to add multiple copies of your widget, let them. If that's not
    S>   possible for whatever reason, then you will at least need to
    S>   issue a warning.

Can I detect that a second instance has been added so that I can display
a toast?



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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

Reply via email to