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.
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?
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 destroyed and removed from the memory.
Here,You can use SQLite DataBase for better performance.
ForceClose Means : Close the Running Application and Free the Memory.
Your question has been answered, but I'd like to add one point. You mention that
when i click and hold Home button i can see that there is still i have instance of application in memory
Please note that what you see when you long press the Home button is the list of recent apps and not the list of apps currently in memory. Hence, even if an app has been force-closed, you will still see it in this list since it was recently used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With