BrunoTS
BrunoTS

Reputation: 171

Android: Application still running after call finish()

I'm new at Android Development...

I create a new activity and call finish(); method. But it still running, consuming battery, memory... Battery and memory consumption after activity is destroyed

Is there a way of stop the application completely, avoiding battery and memory consumption after activity is destroyed?

Upvotes: 1

Views: 1776

Answers (2)

Zwal Pyae Kyaw
Zwal Pyae Kyaw

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

Siamak Ferdos
Siamak Ferdos

Reputation: 3299

finish method just finish the intent! If you want to exit from app then use

system.exit(0);

Upvotes: 0

Related Questions