Which is the right place to call a functions in android when it has several activity class
<p>Actually i have some query regarding the life cycle activity of an android. Actually i have function which is used to set reminders in the devices calender. Now my question is that where should i write this function in so that when the user exit or pause from the app it will call this function.</p>

<p>Now if i have 10 activity class and if i call this function on the onDestroy method of first activity then it is called only when i exit from the first activity, means if the user move to the 5 activity and from there if it click the home button then this function is not called.</p>

<p>So what is the solution for that..whether i should call this function in each activity on destroy method or there is a way to solve this out.</p>
