tags:

views:

31

answers:

1

Hi,

I am looking to create an android widget for my application. It is a static widget, meaning it does not periodically update itself with new data (like google search widget)? If that is the case, do I still need to create a service like the Word Widget sample in the android sdk?

Thank you.

+1  A: 

No you don't need service. You just build your widget UI in onUpdate. Take a look at samples\android-8\ApiDemos\src\com\example\android\apis\appwidget\ExampleAppWidgetProvider.java

You may need service only if your update logic takes time. If it's fast enough service is not required.

Fedor