The 30 minute interval only applies to automatic widget updates, as specified in your widget_info.xml

Your code can update a widget at any time by first calling AppWidgetManager.getInstance(), then using a ComponentName that represents your widget class to update either all your widgets at once, or one by one (two versions of AppWidgetManager.updateAppWidget).

This code can be placed anywhere, not necessarily in your AppWidgetProvider sublclass. However, remember that AppWidgetProvider is a subclass of BroadcastReceiver, so you can set it up to receive other events (such as periodic broadcast intents from the AlarmManager).

-- Kostya

24.11.2010 23:39, Kumar Bibek ?????:
Use a timer in your service, or an Alarm Manager. Timer is appropriate for short durations, while Alarm Manager is preferable used for longer durations between the updates.

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Wed, Nov 24, 2010 at 1:46 PM, Vittochan <[email protected] <mailto:[email protected]>> wrote:

    Hi,
    I know that an appwidget cannot refresh it with an interval minor of
    30 minutes.
    But in internet I have read something about a workaround using a
    system timer.
    Someone know this workaround? Or someone know how can I do to set a
    refresh rate minor?
    I'm developing a kind of clock. There are many clock widget in the
    market, and I think that there is a solution otherwise this kind of
    widget would not exist because they need a refresh rate of at least 1
    minute.
    Thanks

    --
    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]
    <mailto:[email protected]>
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:android-developers%[email protected]>
    For more options, visit this group at
    http://groups.google.com/group/android-developers?hl=en


--
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


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- 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