views:

98

answers:

2

So I've been playing around with android app and widgets. have a few things running. but one thing i cant seem to figure out is how to package more than 1 widget. say i wanted to release my set of widgets?

where in the manifests can i do this? thanks

A: 

If you are doing a widget you should have something like this in your AndroidManifest:

<receiver android:name="SomeCoolWidget">
   <intent-filter>
   <action
   android:name="android.appwidget.action.APPWIDGET_UPDATE" />
   </intent-filter>
   <meta-data
   android:name="android.appwidget.provider"
   android:resource="@xml/something" />
</receiver>

Adding a second receiver should do the trick.

Macarse
thanks, i got this working now.
w-ll
A: 

hi G Can you please put a sample of manifest code here ? I did try the above suggestion but I am able to create a widget only for the first receiver, the second receiver in the manifest is ignored. When creating a 2nd widget, do you seem 2 option of your app in the widget creation list ? Thanks

Usha