How to determine when SCREEN_OFF_TIMEOUT has changed?

by Mike Bautista » Thu, 14 Jan 2010 04:05:15 GMT


Sponsored Links
 I'm trying to make my first widget that toggles the screen time out
settings.  Is there a way for the widget to be notified when
Settings.System.SCREEN_OFF_TIMEOUT has been changed?  I would like to
know this so I can update the widget graphic accordingly.



How to determine when SCREEN_OFF_TIMEOUT has changed?

by Dianne Hackborn » Thu, 14 Jan 2010 04:19:07 GMT


 Sorry there is no notification for this.




>


Sponsored Links


How to determine when SCREEN_OFF_TIMEOUT has changed?

by Mike Bautista » Fri, 15 Jan 2010 12:35:28 GMT


 Thanks for the response.  So what would be the best way to insure that
the state of Settings.System.SCREEN_OFF_TIMEOUT and the view on my
widget stay consistent?  It seems like the only way would be to poll
the setting every X minutes, but perhaps there's a more optimal way?





> >



Other Threads

1. Is there a API implementing a multi-selected list views?

Hi all, 

I want to know if there is a API that have implemented a multi-selected
list views. I am developing a File Manager, and I need a list view where
I can select several items other than only one.

Many thanks.
Frank, Wei




--~--~---------~--~----~------------~-------~--~----~

2. Polling internet, battery life Suggestion / Question?

Hi,

Connecting to internet continously or polling is likely to cause drain on
battery. (
 http://www.***.com/ ;q=battery+life&qt_g=Search+this+group
 ).

Lots of people are going to write apps that poll server. Each one will need
configuration on how often to poll. And user will have to configure in each
app. If he configures every 15 min in 3 different apps and each start poll
at a different point in time he will be connecting to the internet thrice
every 15 min. Not nice.

Suggestion

1. Set up a Internet polling mechanism for polling the internet defaulting
to every fif{*filter*} minutes. User can change this setting in one place. Allow
services / apps to subscribe to this service. IPM(Internet polling
mechanism) wakes up one service at a time. service polls internet does
whatever it wants and goes back to sleep.

Now each app has to initiate a connection and close it, which from my very
basic understanding will slowdown the whole process and again drain battery.
Instead IPM opens a socket and hands socket to each service round robin
fashion. Service only indicates done. When all subscribers done IPM closes
down connection.

Question
Does this make sense, I am no TCP stack or Mobile phone expert. Will
somebody with more knowledge pitch in please.

gk

--~--~---------~--~----~------------~-------~--~----~

3. Simple Talk - Sample GTalk Application -

4. Lost my code

5. about calling back from c++ to android..

6. Persistence of handlers registered with Context.registerReceiver

7. MySQL in android server