Hi Jeff, I am interested in this approach you mentioned here, but I'm having some difficulty implementing it. I currently have 2 widgets with different sizes (large and small). Both widgets will be sharing 1 service in charge of updating the widgets contents accordingly. Each widget's onUpdate will call to start my service. My question would be, how can I get the appWidgetId of the widget that is calling the service to start? This is the only problem I'm having right now. Once I get the appWidgetId, I can easily determine which widget should the service updating based on the appWidgetInfo of the calling widget.
Please help me out with this, I published my widget to the market and some people have complained of ANRs which is why it's important for me to move my update logic to the service. Thanks in advance, Alex On May 18, 1:51 pm, Jeff Sharkey <[email protected]> wrote: > You can use the same configuration activity for multiple widgets. In > the onCreate(), you have the appWidgetId that you're about to > configure, and you can use AppWidgetManager.getAppWidgetInfo() to get > the provider's ComponentName, which will tell you which type ofwidget > you're configuring. > > j > > > > > > On Mon, May 18, 2009 at 10:15 AM, guruk <[email protected]> wrote: > > > but its a pitty that I have to create TWO different configure > > activities also > > > <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/ > > android" > > android:minWidth="74dip" > > android:minHeight="72dip" > > android:updatePeriodMillis="21600000" > > android:initialLayout="@layout/widget_word" > > android:configure="com.chris.app.setwidgetuser" > > /> > > > /xml/widget_word2.xml > > <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/ > > android" > > android:minWidth="74dip" > > android:minHeight="72dip" > > android:updatePeriodMillis="21600000" > > android:initialLayout="@layout/widget_word" > > android:configure="com.chris.app.setwidgetuser2" > > /> > > > or is there a way to check what broadcast starts my configuration, so > > i can > > change some code in it? If possible, just let me know how to get what > > broadcast > > calls my configuration > > > thanks > > -- > Jeff Sharkey > [email protected] Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

