android application design
<p>I have to develop an application where i have to continuously collect the GPS, accelerometer data [esp. when user is in motion i.e traveling, else it can be relaxed). Also I have to communicate with web server and handle the response from the sever. So for this(handling response ) part application should continuously poll. </p>

<p>Based on response from server I have show UI to the user. </p>

<p>I am not very clear about the design.</p>

<p>Do I have to create activity from where I start service. Should service be ran as a separate thread(this always runs in background).</p>

<p>I am planning to create two services. One service to continuously collect GPS data.</p>

<p>Other service for communicating with the web server[start timer/alarm manager] for polling.
ALso can these two services communicate with each other.</p>

<p>Also after processing the response frm server the service should be able to start user interface to show some form. I am not clear how to handle this.</p>

<p>Also is acquiring wakelock required if I have to collect GPS data continuously.</p>

<p>Please clarify.</p>

<p>Thanks</p>
