How does a Homescreen plugin (like 'MessageCount') know when data has changed? Question: How do some of the standard plugins on a SmartPhone know when data has changed (so that the plugin can update the info ont the Homescreen)?
For example, when you get a new voicemail or text message, the "MessageCount" plugin on my Moto-Q phone beeps and shows the number of messages. How does this plugin know that the data has changed? I understand that a running external program can make a call to ShOnPluginDataChange() to inform a specific plugin that data has changed, but what if I wanted to write my own plugin that would update the homescreen if I get a voicemail message?
Do I have a timer event running every few seconds in my plugin that checks for updated info? I don't want to do anything excessive and unnecessary if it drains battery power.
Comments and suggestions are appreciated.
ppcinfo |