In addition to including the appWidgetId as an extra, put it as the PendingIntent requestCode too (assuming you aren't already using that property of the PendingIntent for some other purpose) that will enable the system to distinguish them. Tom.
2009/6/8 Akash Gupta <ricky.dreamwea...@gmail.com> > > I m doing the same thing earlier but its not working...its not able to > identify which widget is launching the activity....if put the > appWidgetId as extra then if have more than one widget on your home > screen and clicking any one of it its always have the latest widget Id > you have added...ne other soln for it??? > > On Jun 8, 4:39 pm, Mark Murphy <mmur...@commonsware.com> wrote: > > dark_messiah wrote: > > > I m creating my own widget...widget initial layout contains one > > > button...when i click on that widget button it shud launch the > > > specified activity using service...everythng is working fine..but the > > > problem comes when there are 2 or more widget on home screen...when i > > > clicking on any one of them i m not able to specify with widget is > > > launching the activity...Please help??? > > > > Put the app-widget instance ID as an extra in the Intent you wrap with a > > PendingIntent that associated with your button. > > > > -- > > Mark Murphy (a Commons Guy)http://commonsware.com| > http://twitter.com/commonsguy > > > > _Android Programming Tutorials_ Version 0.95 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 -~----------~----~----~----~------~----~------~--~---