Using home button on android phone
<p>In iphone when we exit app and start app again by clicking launcher icon the app start from screen which was open last time before exiting app. </p>

<p>We can achieve same in <code>android</code> when we exit app using center or <code>home button</code> on android phone. In android app if app is exited by pressing home button and started again by clicking on launcher icon the app start from activity which was open last time before exiting app. </p>

<p>Is that functionality similar to iphone in terms of keeping app in memory longer? Will that work in android all time because I think android system will remove app from memory after sometime or will it remain in memory longer? Can I depend on this functionality in android and expect it to work all time. </p>

<p>I have a project in android which client has asked me to have iphone like functionality if we exit app and start app again it should open from screen which was opened last time before exiting. Now this is possible in android only if we use centre button. And also if user has exited using centre button and started it again, app should check for user current location and do some other operations. If app is launched and user navigate to any activity is there any way to check if app was exited using back button or centre button so that I can run code if app is exited using center button.</p>

<p>Thanks</p>
