Hmm, I haven't peeked at the ApiDemos code in awhile, but it was
working last time I checked.  Are you testing on a device or the
emulator?  The emulator might not be sending off actual
TIMEZONE_CHANGED broadcasts.

j

On Mon, May 4, 2009 at 7:52 AM, Alea <[email protected]> wrote:
>
> Hi!
>
> I started to implement my own App Widget using the example provided in
> the ApiDemos. In order to update the Widget efficiently I chose the
> BroadcastReceiver mechanism. In the ApiDemos there is this
> ExampleBroadcastReceiver which would (or should) react to changes
> related to TimeZone and Time as specified in the AndroidManifest of
> the ApiDemos.
>
> I have debugged this Example using Eclipse and the Logcat output
> (provoking changes in TimeZone through the settings) and come to the
> conclusion that there must be some bug in the app widget framework.
> The only BroadcastReceiver that seems to work is the AppWidgetProvider
> itself.
>
> For instance I would expect something like: D/ExampleBroadcastReceiver
> intent=XY in the logcat's output after I have provoked the event XY.
>
> I have even tried without the 'enabled' option in the receiver's
> specification in the AndroidManifest.
>
> BroadcastReceivers are needed to keep the update rate of my
> AppWidgetProvider low and to be battery friendly. As for now my own
> AppWidget Implementation that I have written has an update rate of 10
> minutes which I could change to once a day if I could use the
> BroadcastReceiver mechanism.
>
> Hopefully this useful feature can be enabled somehow. Is anyone else
> aware of this problem? Or maybe is there even a solution to this issue
> I am experiencing? Do I have to enable the BroadcastReceiver by code
> and not via the xml?
>
> Cheers,
>
> a desperate AppWidget developer
>
> .....By the way there are some copy&paste errors in the
> ExampleAppWidgetProvider: onEnabled / onDisabled; comment and code
> (eg. PackageManager.COMPONENT_ENABLED_STATE_ENABLED).
>
> >
>



-- 
Jeff Sharkey
[email protected]

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