Reputation: 171
I'm new at Android Development...
I create a new activity and call finish();
method. But it still running, consuming battery, memory...
Is there a way of stop the application completely, avoiding battery and memory consumption after activity is destroyed?
Upvotes: 1
Views: 1776
Reputation: 140
Duplicated Question!
You can't control when your app leaves the main memory, the OS does. Look closely at Activity.finish()
I think there will be no way of stopping the application completely, avoiding battery and memory consumption after the activity is destroyed.
Answer(Link) is :
Activity.finish() called but activity stays loaded in memory
Upvotes: 1
Reputation: 3299
finish method just finish the intent! If you want to exit from app then use
system.exit(0);
Upvotes: 0