I have the requirement to close the activity as soon as it get launched,to achieve this i used finish() method, but it still exists in running application list.
Please suggest me some solution..
I have the requirement to close the activity as soon as it get launched,to achieve this i used finish() method, but it still exists in running application list.
Please suggest me some solution..
The activity you're calling the finish()
method, is destroyed and all its resources are queued for garbage collection, because a reference to this activity becomes inaccessible. So, all memory that was used by this activity will be freed during next GC cycle. and by findihing teh activity, you are destroying the actviity not the app..
Android keeps processes around in case the user wants to restart the app, this makes the startup phase faster. The process will not be doing anything and if memory needs to be reclaimed, the process will be killed. Don't worry about it :)
To remove your app from Recent app
list : just specify android:excludeFromRecents="true"
in the manifest