I have an stock market application. When user login to application, server sends me a session key. This session is valid until user logout the application or don’t do anything for several minutes.
My first problem (that is solved already) was when after login to application, user click home button and after that click on icon of application. Now, after login, a message (sent by server) showed “your user id is in use”. I have solved this issue by saving session id in shared preferences.
Now, the client reported that we have same issue based of this story.
- User login to application
- After that user clicks home button
- User goes to settings/applications/manage applications
- Selects application and then in “Application Info” page, clicks on Force Stop button
- User comes back to application list again and selects the application
- After login, “Session Expired” message will show and application directed to login page again
- Now, when user try to login, the above message (“your user id is in use”) will show while session id is not expired.
I want to know, what “Force Close” button really do? Does it clean all instances of activities? When I click and hold Home button, I can see that I still have an instance of the application in memory. Therefore, what is the role of “Force Close” button?
- Now, if user enter his/her password “your user id is in use” will show again.
When any application is ForceClosed.
The Application is Closed and Android Clears all the memory occupied by the Application.
That’s why when you force close the application your
static data member's are destroyedand removed from the memory.Here,You can use
SQLiteDataBase for better performance.ForceClose Means : Close the Running Application and Free the Memory.