How to have overall data control in an Android application?
<p>I'm starting to work with Android, and as far as I have read, the main structure of an app is a group of more or less independent Activities where one is the main, and from there you launch one or another.</p>

<p>My problem is that some of those activities spend some time when they are created to generate some data, that is lost when the activity ends because of the paradigm of Android.</p>

<p>Also, I want to have some overall control of some parts of my program. For example, I activate a <code>sensorListener</code> in one activity, and I want to keep it working after I end that activity (by pressing "back" or launching another activity).</p>

<p>Is it possible to have some common structure to all the activities where I can place reusable data?</p>

<p>Also, I whould like my app to do something periodically , no matter what activity is working at the moment.</p>

<p>Do you know if there is a "well designed" way to program this overall data structure and periodic tasks?</p>
