Hi,

I hope it is the right android group for this question.

I have a widget that is essentially an image button that toggles
display and speaker modes on a custom Android 2.1 platform. It also
displays different images to indicate what mode is currently selected.

We are adding a hardware button that can also change the same display
modes externally. I will have a driver that translates button presses
to some events (maybe emulate a key press through input events or
something else).

If the user changes the mode by pressing hardware button, the widget
will not know about that and will display wrong image. Is there a way
to synchronize the widget state with the current mode without
constantly polling the driver from the widget code?
Widget can start a background service that would poll my driver every
second or so and update the picture according to the mode reported by
the driver. It does not look like a good solution to me.
Can widgets receive any events besides clicks? Can widget detect when
it becomes visible ?
It looks like "remoteViews" cannot register any event listeners other
than OnClickListener :-(

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