Android BroadcastReceiver Vs Service
<p>I am writing a custom analog clock app widget using canvas and ImageView.</p>

<p>I set an alarm for top of every minute in onEnabled event of widget provider. The alarm calls the BroadcastReceiver which is responsible for drawing the clock.</p>

<p>I though of saving the bitmap to some point, so reduce the drawing time. But a BroadcastReceiver dies as soon as the onUpdate returns so I can't keep the bitmap in it.</p>

<p><strong>First I want to know is there anyway to save something in BroadcastReceiver?</strong></p>

<p>I though of using service instead of BroadcastReceiver as they don't get terminated. But somehow I don't know if it's good for this or not? </p>

<p>And I have some general question about services:</p>

<ol>
<li><p>I read somewhere that a service may get killed by android system? If
it's so, does AlarmManager start it again?</p></li>
<li><p>I don't want to wake up the device to update the clock, because it's
not important and it can be updated very fast as soon as the device
is turned on. I read somewhere that service are run in background.
Do using service and calling it with AlarmManager let device to
sleep?</p></li>
</ol>

<p>And this is how my clock looks:</p>

<p><img src="http://i.stack.imgur.com/PdgPc.png" alt="enter image description here"></p>
