android : trigger method of a running service to act
<p>I have a service that keeps running, and a Timer in there to execute a certain function every X minutes. </p>

<p>From an activity, I'd like this function to be called immediately when something happens, so we don't need to wait untill the function is called by the Timer. Is that possible?</p>

<p>If you like a less 'general' question: </p>

<ul>
<li>I have a database with queued messages (queuing is done in case no network is available). </li>
<li>Every X minutes, my service checks if network is available, and flushes the queue to the server</li>
<li>Now, what I'd like to achieve is that I can trigger this "flushing" of the queue as soon as I've added an item to it (from within an activity). </li>
</ul>

<p>Is that possible?</p>
