android: when does onCreate get called when navigating through activities and how to use a service with them?
<p>suppose that you have two activities A(which is the main activity) and B</p>

<p>when you initially start the application the onCreate of A is being called since that's the main activity</p>

<p>now from A you can go again to B</p>

<p>if you go to B then onCreate of B will be called</p>

<p>if you go back to A what will be called? again onCreate or something else?</p>

<p>now suppose that I want to start a service that will update an arraylist every 10 seconds. The values of this arraylist will be shown in the B activity.</p>

<p>So I will probably start this service in the onCreate of A activity. When the onCreate of A is being called, the service starts doing its job</p>

<p>now, then if I want to view the contents of the arraylist, I will go to the B activity. In the B activity initially the onCreate function will be called, so I can just show the values of the arraylist in this onCreate function, but if I leave this activity, and go to A, and then again back to B, will onCreate be called so that the NEW values of the arraylist will be displayed correctly and not the old ones?</p>

<p>thanks in advance</p>
