android monitoring apps
<p>I would like to create an Android application with real-time monitoring functions.  One monitoring function is to audit the audio flow.  The other function is to interact with a peripheral sensor.  These monitoring functions can be triggered by others. 
Besides, in order to save power consumption, the audio function will be running in a polling mode, i.e. sleep for a certain amount of time and wake for a certain amount of time. </p>

<p>I am considering how to design the Android application. </p>

<ul>
<li><p>Whether to design the audio function as a Service or an Activity? 
The problem is if it is designed as an Activity, the audio function will be off if screen turns off after a period of time.</p></li>
<li><p>How to design the polling function? Use an AlarmManager or a inner-thread with Timer?</p></li>
</ul>

<p>My goal is to save the power consumption as much as possible. Thanks.</p>
