Get the running page in an application
Assume my application contain 3 pages and run that application. In the middl开发者_如何学Pythone of that application at page 2 i got a phone call and after that phone call again i am starting that application using menu in home screen .At that time i want a page where we stop in previous(that means 2 page).Give me the suggestions Thanks in advance
please read http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle
from the above link, when an application loses its focus to other application the focus losing application will be kept on stack and again when it gains the focus it resumes from the previous state. In case if your application contains some perishable data you can use the methods onPause()
when you app loses focus and onResume()
when your app regains the focus.
精彩评论