I have an application that i have to run in kindle fire.
The application is running fine,but after kindle autolocks,application starts from beginning and not from where the application was before the autolock.
why does this happen?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Make sure you are saving your application’s state.
Activities in Android have a very special lifecycle. Whenever an app is put in the background, it calles
onPause()and when you bring it back into view,onResume()is called.So you’ll want to save the state whenever
onPause()oronStop()is called and load the state ononCreate()andonResume()For more about states, read here
Edit:
Also have a look at onSaveInstanceState()